From: Roan Kattouw Date: Thu, 15 Sep 2011 15:40:40 +0000 (+0000) Subject: Followup r93247: add apiScript as a property of a ResourceLoader source. X-Git-Tag: 1.31.0-rc.0~27640 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=b9af8a8118bfeb0d1ddf6d70dba63172712d91aa;p=lhc%2Fweb%2Fwiklou.git Followup r93247: add apiScript as a property of a ResourceLoader source. --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c407aff0fd..80c85bcbf8 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2478,7 +2478,10 @@ $wgResourceModules = array(); * ResourceLoader::__construct() so that it cannot be unset. * * Example: - * $wgResourceLoaderSources['foo'] = array( 'loadScript' => 'http://example.org/w/load.php' ); + * $wgResourceLoaderSources['foo'] = array( + * 'loadScript' => 'http://example.org/w/load.php', + * 'apiScript' => 'http://example.org/w/api.php' + * ); */ $wgResourceLoaderSources = array(); diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 1128264a05..70f1d4fed0 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -188,7 +188,7 @@ class ResourceLoader { wfProfileIn( __METHOD__ ); // Add 'local' source first - $this->addSource( 'local', array( 'loadScript' => $wgLoadScript ) ); + $this->addSource( 'local', array( 'loadScript' => $wgLoadScript, 'apiScript' => wfScript( 'api' ) ) ); // Add other sources $this->addSource( $wgResourceLoaderSources );