r113128 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113127‎ | r113128 | r113129 >
Date:11:12, 6 March 2012
Author:tstarling
Status:ok
Tags:
Comment:
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 (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/includes/OutputPage.php
@@ -2829,7 +2829,7 @@
28302830 * @return array
28312831 */
28322832 public function getJSVars() {
2833 - global $wgUseAjax, $wgEnableMWSuggest;
 2833+ global $wgUseAjax, $wgEnableMWSuggest, $wgContLang;
28342834
28352835 $latestRevID = 0;
28362836 $pageID = 0;
@@ -2881,8 +2881,8 @@
28822882 'wgSeparatorTransformTable' => $compactSeparatorTransTable,
28832883 'wgDigitTransformTable' => $compactDigitTransTable,
28842884 );
2885 - if ( $lang->hasVariants() ) {
2886 - $vars['wgUserVariant'] = $lang->getPreferredVariant();
 2885+ if ( $wgContLang->hasVariants() ) {
 2886+ $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
28872887 }
28882888 foreach ( $title->getRestrictionTypes() as $type ) {
28892889 $vars['wgRestriction' . ucfirst( $type )] = $title->getRestrictions( $type );
Property changes on: branches/wmf/1.19wmf1/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
28902890 Merged /trunk/phase3/includes/OutputPage.php:r113127

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113127Partial revert of r97849: the wgUserVariant variable is useful and used even ...tstarling11:11, 6 March 2012

Status & tagging log