Bug 39496: action=info show non-working magic words
authormadman <madman.enwiki@gmail.com>
Mon, 20 Aug 2012 16:56:51 +0000 (16:56 +0000)
committermadman <madman.enwiki@gmail.com>
Mon, 20 Aug 2012 16:56:51 +0000 (16:56 +0000)
Changed localization of magic words to use content language instead of
user's language.

Change-Id: I7cb114c4aa41af911f34ddc63b2cedbb02b015a6

includes/actions/InfoAction.php

index a249a77..60941c8 100644 (file)
@@ -56,7 +56,7 @@ class InfoAction extends FormlessAction {
         * @return string Page information that will be added to the output
         */
        public function onView() {
-               global $wgDisableCounters, $wgRCMaxAge, $wgRestrictionTypes;
+               global $wgContLang, $wgDisableCounters, $wgRCMaxAge, $wgRestrictionTypes;
 
                $user = $this->getUser();
                $lang = $this->getLanguage();
@@ -244,10 +244,8 @@ class InfoAction extends FormlessAction {
                // Array of magic word IDs
                $wordIDs = $magicWords->names;
 
-               // @todo FIXME: Should report in content language, as localised
-               //              magic words cannot be used.
                // Array of IDs => localized magic words
-               $localizedWords = $lang->getMagicWords();
+               $localizedWords = $wgContLang->getMagicWords();
 
                $listItems = array();
                foreach ( $pageProperties as $property => $value ) {