ResourceLoaderFileModule: Implement remoteSkinPath option
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderFileModule.php
index fa9a8f0..190801c 100644 (file)
@@ -181,6 +181,8 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *         'remoteBasePath' => [base path],
         *         // Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath
         *         'remoteExtPath' => [base path],
+        *         // Equivalent of remoteBasePath, but relative to $wgStylePath
+        *         'remoteSkinPath' => [base path],
         *         // Scripts to always include
         *         'scripts' => [file path string or array of file path strings],
         *         // Scripts to include in specific language contexts
@@ -232,6 +234,11 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        $this->remoteBasePath = $wgExtensionAssetsPath . '/' . $options['remoteExtPath'];
                }
 
+               if ( isset( $options['remoteSkinPath'] ) ) {
+                       global $wgStylePath;
+                       $this->remoteBasePath = $wgStylePath . '/' . $options['remoteSkinPath'];
+               }
+
                foreach ( $options as $member => $option ) {
                        switch ( $member ) {
                                // Lists of file paths