From 414f7c060affccada3c692abdb479456fff82f30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 23 Jul 2015 19:22:24 +0200 Subject: [PATCH] ResourcesOOUI: Convert theme names to lowercase We'd like 'SkinOOUIThemes' to use canonical mixed-case theme names (see I368804cca141acf9cc15a348d9b7244046395a70), so we must ensure that lowercase ones are used for file names here before we change the affected skins (Apex and MonoBook, see I1a88092f0ceb210c642bbee875e368ded3c186f8). Change-Id: I489922dab303320bfecfbadd26069abbad7d2c53 --- resources/ResourcesOOUI.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/ResourcesOOUI.php b/resources/ResourcesOOUI.php index 8320b371ae..974db87ea2 100644 --- a/resources/ResourcesOOUI.php +++ b/resources/ResourcesOOUI.php @@ -27,11 +27,12 @@ if ( !defined( 'MEDIAWIKI' ) ) { // WARNING: OOjs-UI is NOT TESTED with older browsers and is likely to break // if loaded in browsers that don't support ES5 return call_user_func( function () { - // Core default themes - $themes = array( 'default' => 'mediawiki' ); - $themes += ExtensionRegistry::getInstance()->getAttribute( 'SkinOOUIThemes' ); - $modules = array(); + $themes = ExtensionRegistry::getInstance()->getAttribute( 'SkinOOUIThemes' ); + // We only use the theme names for file names, and they are lowercase + $themes = array_map( 'strtolower', $themes ); + $themes['default'] = 'mediawiki'; + $modules = array(); $modules['oojs-ui'] = array( 'scripts' => array( 'resources/lib/oojs-ui/oojs-ui.js', -- 2.20.1