Added alias of jQuery to $j - this is only to get site/user scripts that were using...
[lhc/web/wiklou.git] / maintenance / parserTestsParserTime.php
1 <?php
2 if ( ! defined( 'MEDIAWIKI' ) )
3 die( -1 );
4 /**
5 * A basic extension that's used by the parser tests to test date magic words
6 *
7 * Handy so that we don't have to upgrade the parsertests every second to
8 * compensate with the passage of time and certainly less expensive than a
9 * time-freezing device, get yours now!
10 *
11 * Copyright © 2005, 2006 Ævar Arnfjörð Bjarmason
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 * http://www.gnu.org/copyleft/gpl.html
27 *
28 * @file
29 * @ingroup Maintenance
30 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
31 */
32
33 $wgHooks['ParserGetVariableValueTs'][] = 'wfParserTimeSetup';
34
35 function wfParserTimeSetup( &$parser, &$ts ) {
36 $ts = 123; // $ perl -le 'print scalar localtime 123' ==> Thu Jan 1 00:02:03 1970
37
38 return true;
39 }
40