Index: trunk/phase3/maintenance/parserTestsParserTime.php |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +<?php |
| 3 | +if ( ! defined( 'MEDIAWIKI' ) ) |
| 4 | + die(); |
| 5 | +/** |
| 6 | + * A basic extension that's used by the parser tests to test date magic words |
| 7 | + * |
| 8 | + * Handy so that we don't have to upgrade the parsertests every second to |
| 9 | + * compensate with the passage of time and certainly less expensive than a |
| 10 | + * time-freezing device, get yours now! |
| 11 | + * |
| 12 | + * @package MediaWiki |
| 13 | + * @subpackage Maintenance |
| 14 | + * |
| 15 | + * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com> |
| 16 | + * @copyright Copyright © 2005, 2006 Ævar Arnfjörð Bjarmason |
| 17 | + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
| 18 | + */ |
| 19 | + |
| 20 | +$wgHooks['ParserGetVariableValueTs'][] = 'wfParserTimeSetup'; |
| 21 | + |
| 22 | +function wfParserTimeSetup( &$parser, &$ts ) { |
| 23 | + $ts = 123; //$ perl -le 'print scalar localtime 123' ==> Thu Jan 1 00:02:03 1970 |
| 24 | + |
| 25 | + return true; |
| 26 | +} |
Property changes on: trunk/phase3/maintenance/parserTestsParserTime.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 27 | + native |
Added: svn:keywords |
2 | 28 | + Author Date Id Revision |