Reverting r21560 as discussed; there are severe problems with relying on a user-langu...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 27 Apr 2007 15:12:22 +0000 (15:12 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 27 Apr 2007 15:12:22 +0000 (15:12 +0000)
includes/MagicWord.php
includes/Parser.php
languages/messages/MessagesEn.php

index e8fc59a..bf72a0c 100644 (file)
@@ -97,7 +97,6 @@ class MagicWord {
                'localtimestamp',
                'directionmark',
                'language',
-               'userlanguage',
                'contentlanguage',
                'pagesinnamespace',
                'numberofadmins',
index f92c829..8e36e17 100644 (file)
@@ -2560,11 +2560,9 @@ class Parser
                                return $wgScriptPath;
                        case 'directionmark':
                                return $wgContLang->getDirMark();
-                       case 'userlanguage':
-                               global $wgLang;
-                               return $wgLang->getCode();
                        case 'contentlanguage':
-                               return $wgContLang->getCode();
+                               global $wgContLanguageCode;
+                               return $wgContLanguageCode;
                        default:
                                $ret = null;
                                if ( wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$varCache, &$index, &$ret ) ) )
index f1c6500..a2ad2f3 100644 (file)
@@ -329,7 +329,6 @@ $magicWords = array(
        'localtimestamp'         => array( 1,    'LOCALTIMESTAMP'         ),
        'directionmark'          => array( 1,    'DIRECTIONMARK', 'DIRMARK' ),
        'language'               => array( 0,    '#LANGUAGE:'             ),
-       'userlanguage'           => array( 1,    'USERLANGUAGE', 'USERLANG' ),
        'contentlanguage'        => array( 1,    'CONTENTLANGUAGE', 'CONTENTLANG' ),
        'pagesinnamespace'       => array( 1,    'PAGESINNAMESPACE:', 'PAGESINNS:' ),
        'numberofadmins'         => array( 1,    'NUMBEROFADMINS'         ),