From: Sam Reed Date: Mon, 3 Oct 2011 13:37:47 +0000 (+0000) Subject: Merge r97771, r97775 X-Git-Tag: 1.31.0-rc.0~27292 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=f639abf12e51c0abc524b7cca7207241d06b3089;p=lhc%2Fweb%2Fwiklou.git Merge r97771, r97775 --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 99a3abb8af..35ae738373 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1381,6 +1381,7 @@ $wgExternalServers = array(); * * $wgDefaultExternalStore = array( 'DB://cluster1', 'DB://cluster2' ); * + * @var array */ $wgDefaultExternalStore = false; @@ -2487,6 +2488,12 @@ $wgResourceModules = array(); */ $wgResourceLoaderSources = array(); +/* + * Default 'remoteBasePath' value for resource loader modules. + * If not set, then $wgScriptPath will be used as a fallback. + */ +$wgResourceBasePath = null; + /** * Maximum time in seconds to cache resources served by the resource loader */ diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index 6b30eb192d..0b006bf8d4 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -148,9 +148,13 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { public function __construct( $options = array(), $localBasePath = null, $remoteBasePath = null ) { - global $IP, $wgScriptPath; + global $IP, $wgScriptPath, $wgResourceBasePath; $this->localBasePath = $localBasePath === null ? $IP : $localBasePath; - $this->remoteBasePath = $remoteBasePath === null ? $wgScriptPath : $remoteBasePath; + if ( $remoteBasePath !== null ) { + $this->remoteBasePath = $remoteBasePath; + } else { + $this->remoteBasePath = $wgResourceBasePath === null ? $wgScriptPath : $wgResourceBasePath; + } if ( isset( $options['remoteExtPath'] ) ) { global $wgExtensionAssetsPath;