From 9c8e5796c8a906e79dd63d212bb994e24b72debe Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 3 May 2009 12:38:13 +0000 Subject: [PATCH] Cleanup in MagicWord::$mVariableIDs, removed IDs that aren't handled in Parser::getVariableValue(). 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 | 11 ----------- maintenance/parserTests.txt | 11 +---------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 4e97016dde..8fdfddc9eb 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -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 */ diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 1d4a95eaa5..298fc6a018 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -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 -- 2.20.1