class ApiUndelete extends ApiBase {
public function execute() {
+ $this->useTransactionalTimeLimit();
+
$params = $this->extractRequestParams();
if ( !$this->getUser()->isAllowed( 'undelete' ) ) {
}
if ( $this->getUser()->isBlocked() ) {
- $this->dieUsageMsg( 'blockedtext' );
+ $this->dieUsage(
+ 'You have been blocked from editing',
+ 'blocked',
+ 0,
+ array( 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $this->getUser()->getBlock() ) )
+ );
}
$titleObj = Title::newFromText( $params['title'] );
}
if ( $retval[1] ) {
- wfRunHooks( 'FileUndeleteComplete',
+ Hooks::run( 'FileUndeleteComplete',
array( $titleObj, $params['fileids'], $this->getUser(), $params['reason'] ) );
}