adding available skins to mw.config.values
authorKrinkle <krinkle@users.mediawiki.org>
Sun, 23 Jan 2011 02:19:58 +0000 (02:19 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Sun, 23 Jan 2011 02:19:58 +0000 (02:19 +0000)
includes/resourceloader/ResourceLoaderStartUpModule.php

index e7d7e86..de99cf3 100644 (file)
@@ -49,6 +49,11 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        implode( "\t", $digitTransTable ),
                );
                $mainPage = Title::newMainPage();
+               // Available skins by code and with display name
+               $availableSkins = array();
+               foreach ( Skin::getSkinNames() as $skinName => $skinDisplayName ) {
+                       $availableSkins[$skinName] = $skinDisplayName;
+               }
                
                // Build list of variables
                $vars = array(
@@ -80,6 +85,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        // This sucks, it is only needed on Special:Upload, but I could 
                        // not find a way to add vars only for a certain module
                        'wgFileCanRotate' => BitmapHandler::canRotate(),
+                       'wgAvailableSkins' => $availableSkins,
                );
                if ( $wgContLang->hasVariants() ) {
                        $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();