resourceloader: Require $wgResourceModuleSkinStyles paths to be in the base definition
authorKunal Mehta <legoktm@gmail.com>
Mon, 6 Apr 2015 22:31:31 +0000 (15:31 -0700)
committerKunal Mehta <legoktm@gmail.com>
Mon, 6 Apr 2015 22:59:21 +0000 (15:59 -0700)
No skin in gerrit uses the feature of per-module local or remote paths,
and not supporting it will make implementing extension/skin.json support
easier.

Change-Id: I22863ef29426dbacd65439a12aeae56d4d757951

RELEASE-NOTES-1.25
includes/DefaultSettings.php
includes/resourceloader/ResourceLoader.php

index 1ec8b93..5bb5893 100644 (file)
@@ -424,6 +424,8 @@ changes to languages because of Bugzilla reports.
   retrievedfrom, thisisdeleted, viewsourcelink, lastmodifiedat, laggedslavemode,
   protect-summary-cascade
 * All BloomCache related code has been removed. This was largely experimental.
+* $wgResourceModuleSkinStyles no longer supports per-module local or remote paths. They
+  can only be set for the entire skin.
 
 == Compatibility ==
 
index fe67adf..c8197f2 100644 (file)
@@ -3338,8 +3338,6 @@ $wgResourceModules = array();
  *
  * As with $wgResourceModules, paths default to being relative to the MediaWiki root.
  * You should always provide a localBasePath and remoteBasePath (or remoteExtPath/remoteSkinPath).
- * Either for all skin styles at once (first example below) or for each module separately (second
- * example).
  *
  * @par Example:
  * @code
@@ -3349,19 +3347,6 @@ $wgResourceModules = array();
  *     'remoteSkinPath' => 'Foo',
  *     'localBasePath' => __DIR__,
  *   );
- *
- *   $wgResourceModuleSkinStyles['foo'] = array(
- *     'bar' => array(
- *       'bar.css',
- *       'remoteSkinPath' => 'Foo',
- *       'localBasePath' => __DIR__,
- *     ),
- *     'quux' => array(
- *       'quux.css',
- *       'remoteSkinPath' => 'Foo',
- *       'localBasePath' => __DIR__,
- *     ),
- *   );
  * @endcode
  */
 $wgResourceModuleSkinStyles = array();
index 976275b..3d5cc51 100644 (file)
@@ -346,12 +346,9 @@ class ResourceLoader {
                                        }
 
                                        // Add new file paths, remapping them to refer to our directories and not use settings
-                                       // from the module we're modifying. These can come from the base definition or be defined
-                                       // for each module.
+                                       // from the module we're modifying, which come from the base definition.
                                        list( $localBasePath, $remoteBasePath ) =
                                                ResourceLoaderFileModule::extractBasePaths( $skinStyles );
-                                       list( $localBasePath, $remoteBasePath ) =
-                                               ResourceLoaderFileModule::extractBasePaths( $paths, $localBasePath, $remoteBasePath );
 
                                        foreach ( $paths as $path ) {
                                                $styleFiles[] = new ResourceLoaderFilePath( $path, $localBasePath, $remoteBasePath );