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

Revision: 113128
Author:   tstarling
Date:     2012-03-06 11:12:20 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
MFT r113127: the wgUserVariant variable is useful and used even on special 
pages, removing it breaks b/c

Modified Paths:
--------------
    branches/wmf/1.19wmf1/includes/OutputPage.php

Property Changed:
----------------
    branches/wmf/1.19wmf1/includes/OutputPage.php

Modified: branches/wmf/1.19wmf1/includes/OutputPage.php
===================================================================
--- branches/wmf/1.19wmf1/includes/OutputPage.php       2012-03-06 11:11:01 UTC 
(rev 113127)
+++ branches/wmf/1.19wmf1/includes/OutputPage.php       2012-03-06 11:12:20 UTC 
(rev 113128)
@@ -2829,7 +2829,7 @@
         * @return array
         */
        public function getJSVars() {
-               global $wgUseAjax, $wgEnableMWSuggest;
+               global $wgUseAjax, $wgEnableMWSuggest, $wgContLang;
 
                $latestRevID = 0;
                $pageID = 0;
@@ -2881,8 +2881,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 );


Property changes on: branches/wmf/1.19wmf1/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/JSTesting/includes/OutputPage.php:100352-107913
/branches/REL1_15/phase3/includes/OutputPage.php:51646
/branches/REL1_17/phase3/includes/OutputPage.php:81445
/branches/resourceloader/phase3/includes/OutputPage.php:68366-69676,69678-70682,70684-71999,72001-72255,72257-72305,72307-72342
/branches/wmf-deployment/includes/OutputPage.php:53381,57468
/trunk/phase3/includes/OutputPage.php:111029,111034,111067,111085,111128,111144,111597
   + /branches/JSTesting/includes/OutputPage.php:100352-107913
/branches/REL1_15/phase3/includes/OutputPage.php:51646
/branches/REL1_17/phase3/includes/OutputPage.php:81445
/branches/resourceloader/phase3/includes/OutputPage.php:68366-69676,69678-70682,70684-71999,72001-72255,72257-72305,72307-72342
/branches/wmf-deployment/includes/OutputPage.php:53381,57468
/trunk/phase3/includes/OutputPage.php:111029,111034,111067,111085,111128,111144,111597,113127


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to