From: Andrew Garrett Date: Wed, 25 Mar 2009 12:27:04 +0000 (+0000) Subject: Convert formatdate to a hashed parserfunction X-Git-Tag: 1.31.0-rc.0~42367 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=27ea934436c98ec20d665c7c3684a509a19959d5;p=lhc%2Fweb%2Fwiklou.git Convert formatdate to a hashed parserfunction --- diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 9d656d2ec1..774e96a7fd 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -67,7 +67,7 @@ class CoreParserFunctions { $parser->setFunctionHook( 'subjectpagename', array( __CLASS__, 'subjectpagename' ), SFH_NO_HASH ); $parser->setFunctionHook( 'subjectpagenamee', array( __CLASS__, 'subjectpagenamee' ), SFH_NO_HASH ); $parser->setFunctionHook( 'tag', array( __CLASS__, 'tagObj' ), SFH_OBJECT_ARGS ); - $parser->setFunctionHook( 'formatdate', array( __CLASS__, 'formatDate' ), SFH_NO_HASH ); + $parser->setFunctionHook( 'formatdate', array( __CLASS__, 'formatDate' ) ); if ( $wgAllowDisplayTitle ) { $parser->setFunctionHook( 'displaytitle', array( __CLASS__, 'displaytitle' ), SFH_NO_HASH ); diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index d1d10fae99..1a42700567 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -7263,18 +7263,18 @@ wgUseDynamicDates=1 !!end !!test -Formatted unlinked date +formatdate parser function !!input -{{formatdate:2009-03-24}} +{{#formatdate:2009-03-24}} !! result

2009-03-24

!! end !!test -Formatted unlinked date with default format +formatdate parser function, with default format !!input -{{formatdate:2009-03-24|mdy}} +{{#formatdate:2009-03-24|mdy}} !! result

March 24, 2009