Index: branches/wmf/1.18wmf1/includes/resourceloader/ResourceLoaderFileModule.php |
— | — | @@ -148,9 +148,13 @@ |
149 | 149 | public function __construct( $options = array(), $localBasePath = null, |
150 | 150 | $remoteBasePath = null ) |
151 | 151 | { |
152 | | - global $IP, $wgScriptPath; |
| 152 | + global $IP, $wgScriptPath, $wgResourceBasePath; |
153 | 153 | $this->localBasePath = $localBasePath === null ? $IP : $localBasePath; |
154 | | - $this->remoteBasePath = $remoteBasePath === null ? $wgScriptPath : $remoteBasePath; |
| 154 | + if ( $wgResourceBasePath !== null ) { |
| 155 | + $this->remoteBasePath = $wgResourceBasePath; |
| 156 | + } else { |
| 157 | + $this->remoteBasePath = $remoteBasePath === null ? $wgScriptPath : $remoteBasePath; |
| 158 | + } |
155 | 159 | |
156 | 160 | if ( isset( $options['remoteExtPath'] ) ) { |
157 | 161 | global $wgExtensionAssetsPath; |
Index: branches/wmf/1.18wmf1/includes/DefaultSettings.php |
— | — | @@ -2453,6 +2453,12 @@ |
2454 | 2454 | $wgResourceModules = array(); |
2455 | 2455 | |
2456 | 2456 | /** |
| 2457 | + * Default 'remoteBasePath' value for resource loader modules. |
| 2458 | + * If not set, then $wgScriptPath will be used as a fallback. |
| 2459 | + */ |
| 2460 | +$wgResourceBasePath = null; |
| 2461 | + |
| 2462 | +/** |
2457 | 2463 | * Maximum time in seconds to cache resources served by the resource loader |
2458 | 2464 | */ |
2459 | 2465 | $wgResourceLoaderMaxage = array( |