Followup r93247: add apiScript as a property of a ResourceLoader source.
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 15 Sep 2011 15:40:40 +0000 (15:40 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 15 Sep 2011 15:40:40 +0000 (15:40 +0000)
includes/DefaultSettings.php
includes/resourceloader/ResourceLoader.php

index c407aff..80c85bc 100644 (file)
@@ -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();
 
index 1128264..70f1d4f 100644 (file)
@@ -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 );