From db27c3b0ddcae225736d547df52f0b231e4cecc4 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Sun, 23 Jan 2011 02:19:58 +0000 Subject: [PATCH] adding available skins to mw.config.values --- includes/resourceloader/ResourceLoaderStartUpModule.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index e7d7e86c51..de99cf3760 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -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(); -- 2.20.1