https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113127

Revision: 113127
Author:   tstarling
Date:     2012-03-06 11:11:01 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
Partial revert of r97849: the wgUserVariant variable is useful and used even on 
special pages, removing it breaks b/c

Modified Paths:
--------------
    trunk/phase3/includes/OutputPage.php

Modified: trunk/phase3/includes/OutputPage.php
===================================================================
--- trunk/phase3/includes/OutputPage.php        2012-03-06 10:49:58 UTC (rev 
113126)
+++ trunk/phase3/includes/OutputPage.php        2012-03-06 11:11:01 UTC (rev 
113127)
@@ -2830,7 +2830,7 @@
         * @return array
         */
        public function getJSVars() {
-               global $wgUseAjax, $wgEnableMWSuggest;
+               global $wgUseAjax, $wgEnableMWSuggest, $wgContLang;
 
                $latestRevID = 0;
                $pageID = 0;
@@ -2882,8 +2882,8 @@
                        'wgSeparatorTransformTable' => 
$compactSeparatorTransTable,
                        'wgDigitTransformTable' => $compactDigitTransTable,
                );
-               if ( $lang->hasVariants() ) {
-                       $vars['wgUserVariant'] = $lang->getPreferredVariant();
+               if ( $wgContLang->hasVariants() ) {
+                       $vars['wgUserVariant'] = 
$wgContLang->getPreferredVariant();
                }
                foreach ( $title->getRestrictionTypes() as $type ) {
                        $vars['wgRestriction' . ucfirst( $type )] = 
$title->getRestrictions( $type );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to