}
$this->mResult->setErrorFormatter( $this->getErrorFormatter() );
- $this->mModuleMgr = new ApiModuleManager( $this );
+ $this->mModuleMgr = new ApiModuleManager(
+ $this,
+ MediaWikiServices::getInstance()->getObjectFactory()
+ );
$this->mModuleMgr->addModules( self::$Modules, 'action' );
$this->mModuleMgr->addModules( $config->get( 'APIModules' ), 'action' );
$this->mModuleMgr->addModules( self::$Formats, 'format' );
$this->mEnableWrite = $enableWrite;
$this->mCdnMaxAge = -1; // flag for executeActionWithErrorHandling()
- $this->mCommit = false;
}
/**
* @return string
*/
protected function encodeRequestLogValue( $s ) {
- static $table;
+ static $table = [];
if ( !$table ) {
$chars = ';@$!*(),/:';
$numChars = strlen( $chars );
];
}
+ /**
+ * @inheritDoc
+ * @phan-param array{nolead?:bool,headerlevel?:int,tocnumber?:int[]} $options
+ */
public function modifyHelp( array &$help, array $options, array &$tocData ) {
// Wish PHP had an "array_insert_before". Instead, we have to manually
// reindex the array to get 'permissions' in the right place.