Per Philip Tzou, move wgUserVariant from the set of config variables to the set of...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 16 Feb 2011 17:06:24 +0000 (17:06 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 16 Feb 2011 17:06:24 +0000 (17:06 +0000)
includes/Skin.php
includes/resourceloader/ResourceLoaderStartUpModule.php

index 3a671dc..0d9380a 100644 (file)
@@ -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 );
                }
index f79cc20..1ecb77c 100644 (file)
@@ -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();
                }