From 6b6fe23e74746bfc41f84c3960bf3ccac8942a3e Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 8 Feb 2011 12:34:08 +0000 Subject: [PATCH] Remove $wgServer prepending from remote JS/CSS paths. It's not needed and breaks other-domain $wgStylePath / $wgExtensionAssetsPath settings --- includes/resourceloader/ResourceLoaderFileModule.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index d39cd46f59..b2454f73af 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -206,8 +206,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { * @return String: JavaScript code for $context */ public function getScript( ResourceLoaderContext $context ) { - global $wgServer; - $files = array_merge( $this->scripts, self::tryForKey( $this->languageScripts, $context->getLanguage() ), @@ -218,7 +216,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { if ( $this->debugRaw ) { $script = ''; foreach ( $files as $file ) { - $path = $wgServer . $this->getRemotePath( $file ); + $path = $this->getRemotePath( $file ); $script .= "\n\t" . Xml::encodeJsCall( 'mediaWiki.loader.load', array( $path ) ); } return $script; -- 2.20.1