Cleanup in MagicWord::$mVariableIDs, removed IDs that aren't handled in Parser::getVa...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 3 May 2009 12:38:13 +0000 (12:38 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 3 May 2009 12:38:13 +0000 (12:38 +0000)
Side effect: Removed "Pages in namespace (Magic word disabled currently)" parser test added in r17687 by nickj (was passing; I know). The problem is that the expected result is an empty string, but since it's disabled by default with $wgAllowSlowParserFunctions = false (i.e. not added to parser's list of magic words IDs) it should return a red link to [[Template:PAGESINNAMESPACE:]] (the empty string is produced because "{{PAGESINNAMESPACE:}}" is handled as variable and not as parser function).

includes/MagicWord.php
maintenance/parserTests.txt

index 4e97016..8fdfddc 100644 (file)
@@ -81,7 +81,6 @@ class MagicWord {
                'revisionuser',
                'subpagename',
                'subpagenamee',
-               'displaytitle',
                'talkspace',
                'talkspacee',
                'subjectspace',
@@ -92,26 +91,16 @@ class MagicWord {
                'subjectpagenamee',
                'numberofusers',
                'numberofactiveusers',
-               'newsectionlink',
-               'nonewsectionlink',
                'numberofpages',
                'currentversion',
                'basepagename',
                'basepagenamee',
-               'urlencode',
                'currenttimestamp',
                'localtimestamp',
                'directionmark',
-               'language',
                'contentlanguage',
-               'pagesinnamespace',
                'numberofadmins',
                'numberofviews',
-               'defaultsort',
-               'pagesincategory',
-               'index',
-               'noindex',
-               'numberingroup',
        );
 
        /* Array of caching hints for ParserCache */
index 1d4a95e..298fc6a 100644 (file)
@@ -1,4 +1,4 @@
-# MediaWiki Parser test cases
+# MediaWiki Parser test cases
 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
 # All (C) their respective authors and released under the GPL
 #
@@ -6661,15 +6661,6 @@ ISBN 1 234 56789 0 - 2006
 !! end
 
 
-!! test
-Pages in namespace (Magic word disabled currently)
-!! input
-{{PAGESINNAMESPACE:}}
-!! result
-
-!! end
-
-
 !! test
 anchorencode
 !! input