* 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();
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 );