From: Bartosz DziewoƄski Date: Fri, 17 Mar 2017 01:21:34 +0000 (+0100) Subject: ResourceLoaderOOUIImageModule: Actually load non-default themes' images X-Git-Tag: 1.31.0-rc.0~3539^2~2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=5af0c8f2be29f6a54a33988a57fdddc7cc366d86;p=lhc%2Fweb%2Fwiklou.git ResourceLoaderOOUIImageModule: Actually load non-default themes' images Values in SkinOOUIThemes are TitleCase, but these filenames are lowercase. And we silently ignore missing files. This only worked for the default theme, which is hardcoded to lowercase 'mediawiki' above. Change-Id: I5b14d65a8f7d5219acfa2a40eabbb13617833b26 --- diff --git a/includes/resourceloader/ResourceLoaderOOUIImageModule.php b/includes/resourceloader/ResourceLoaderOOUIImageModule.php index 29f5ccedb5..14e5c2691e 100644 --- a/includes/resourceloader/ResourceLoaderOOUIImageModule.php +++ b/includes/resourceloader/ResourceLoaderOOUIImageModule.php @@ -41,7 +41,7 @@ class ResourceLoaderOOUIImageModule extends ResourceLoaderImageModule { foreach ( $themes as $skin => $theme ) { // Find the path to the JSON file which contains the actual image definitions for this theme // TODO Allow extensions to specify this path somehow - $dataPath = $rootPath . '/' . $theme . '/' . $name . '.json'; + $dataPath = $rootPath . '/' . strtolower( $theme ) . '/' . $name . '.json'; $localDataPath = $this->localBasePath . '/' . $dataPath; // If there's no file for this module of this theme, that's okay, it will just use the defaults