From: Roan Kattouw Date: Wed, 16 Feb 2011 17:06:24 +0000 (+0000) Subject: Per Philip Tzou, move wgUserVariant from the set of config variables to the set of... X-Git-Tag: 1.31.0-rc.0~31972 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=f5533b0c986378c0130e994863123c88c4d9289f;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/Skin.php b/includes/Skin.php index 3a671dc842..0d9380a7e4 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -500,6 +500,9 @@ abstract class Skin extends Linker { 'wgCategories' => $wgOut->getCategories(), 'wgBreakFrames' => $wgOut->getFrameOptions() == 'DENY', ); + if ( $wgContLang->hasVariants() ) { + $vars['wgUserVariant'] = $wgContLang->getPreferredVariant(); + } foreach ( $wgTitle->getRestrictionTypes() as $type ) { $vars['wgRestriction' . ucfirst( $type )] = $wgTitle->getRestrictions( $type ); } diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index f79cc207af..1ecb77c61d 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -87,9 +87,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { 'wgAvailableSkins' => Skin::getSkinNames(), 'wgExtensionAssetsPath' => $wgExtensionAssetsPath, ); - if ( $wgContLang->hasVariants() ) { - $vars['wgUserVariant'] = $wgContLang->getPreferredVariant(); - } if ( $wgUseAjax && $wgEnableMWSuggest ) { $vars['wgMWSuggestTemplate'] = SearchEngine::getMWSuggestTemplate(); }