From: Bartosz DziewoƄski Date: Thu, 23 Jul 2015 17:22:24 +0000 (+0200) Subject: ResourcesOOUI: Convert theme names to lowercase X-Git-Tag: 1.31.0-rc.0~10670^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=414f7c060affccada3c692abdb479456fff82f30;p=lhc%2Fweb%2Fwiklou.git 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 --- 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',