From: Skizzerz Date: Fri, 27 Dec 2013 23:51:24 +0000 (-0600) Subject: Fix error introduced in Change Ieae80c63e391cfb1af61841a6badd51b87d00cfe X-Git-Tag: 1.31.0-rc.0~17480 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=e035a14604b7558bd42462760636575224ed3d27;p=lhc%2Fweb%2Fwiklou.git Fix error introduced in Change Ieae80c63e391cfb1af61841a6badd51b87d00cfe The {{NAMESPACE}} magic word is broken by the above commit, since it uses the function name "mwnamespace" in order to not conflict with the PHP 5.3 namespace keyword. Change-Id: I807c9b89c101db289c0ec47593c18b0d1dc2260b --- diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index ec8f776275..9038b5e594 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -46,7 +46,7 @@ class CoreParserFunctions { 'numberofarticles', 'numberoffiles', 'numberofadmins', 'numberingroup', 'numberofedits', 'numberofviews', 'language', 'padleft', 'padright', 'anchorencode', 'defaultsort', 'filepath', - 'pagesincategory', 'pagesize', 'protectionlevel', 'namespace', + 'pagesincategory', 'pagesize', 'protectionlevel', 'namespacee', 'namespacenumber', 'talkspace', 'talkspacee', 'subjectspace', 'subjectspacee', 'pagename', 'pagenamee', 'fullpagename', 'fullpagenamee', 'rootpagename', 'rootpagenamee', @@ -60,6 +60,7 @@ class CoreParserFunctions { $parser->setFunctionHook( $func, array( __CLASS__, $func ), SFH_NO_HASH ); } + $parser->setFunctionHook( 'namespace', array( __CLASS__, 'mwnamespace' ), SFH_NO_HASH ); $parser->setFunctionHook( 'int', array( __CLASS__, 'intFunction' ), SFH_NO_HASH ); $parser->setFunctionHook( 'special', array( __CLASS__, 'special' ) ); $parser->setFunctionHook( 'speciale', array( __CLASS__, 'speciale' ) );