The API currently allows for adding action modules with
$wgAPIModules and query modules with various other $wgAPI*Modules
variables. But there's no way to add a formatting module from an
extension. For parallelism, let's add $wgAPIFormatModules to do just
that.
Bug: 57637
Change-Id: Ia0bd253104a4b5bc56d4fe0dc6736e2129b126f3
* @todo Describe each of the variables, group them and add examples
*/
$wgAPIModules = array();
+$wgAPIFormatModules = array();
$wgAPIMetaModules = array();
$wgAPIPropModules = array();
$wgAPIListModules = array();
}
}
- global $wgAPIModules;
+ global $wgAPIModules, $wgAPIFormatModules;
$this->mModuleMgr = new ApiModuleManager( $this );
$this->mModuleMgr->addModules( self::$Modules, 'action' );
$this->mModuleMgr->addModules( $wgAPIModules, 'action' );
$this->mModuleMgr->addModules( self::$Formats, 'format' );
+ $this->mModuleMgr->addModules( $wgAPIFormatModules, 'format' );
$this->mResult = new ApiResult( $this );
$this->mEnableWrite = $enableWrite;