r82258 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82257‎ | r82258 | r82259 >
Date:17:06, 16 February 2011
Author:catrope
Status:resolved
Tags:
Comment:
Per Philip Tzou, move wgUserVariant from the set of config variables to the set of pageview-specific variables, because it depends on user settings and such
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php
@@ -87,9 +87,6 @@
8888 'wgAvailableSkins' => Skin::getSkinNames(),
8989 'wgExtensionAssetsPath' => $wgExtensionAssetsPath,
9090 );
91 - if ( $wgContLang->hasVariants() ) {
92 - $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
93 - }
9491 if ( $wgUseAjax && $wgEnableMWSuggest ) {
9592 $vars['wgMWSuggestTemplate'] = SearchEngine::getMWSuggestTemplate();
9693 }
Index: trunk/phase3/includes/Skin.php
@@ -500,6 +500,9 @@
501501 'wgCategories' => $wgOut->getCategories(),
502502 'wgBreakFrames' => $wgOut->getFrameOptions() == 'DENY',
503503 );
 504+ if ( $wgContLang->hasVariants() ) {
 505+ $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
 506+ }
504507 foreach ( $wgTitle->getRestrictionTypes() as $type ) {
505508 $vars['wgRestriction' . ucfirst( $type )] = $wgTitle->getRestrictions( $type );
506509 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r822601.17wmf1: MFT r82258catrope17:14, 16 February 2011
r82263Fix fatal in r82258catrope17:31, 16 February 2011

Status & tagging log