$user = $this->getUser();
$this->checkUserRightsAny( RevisionDeleter::getRestriction( $params['type'] ) );
- if ( $user->isBlocked() ) {
- $this->dieBlocked( $user->getBlock() );
+ // @TODO Use PermissionManager::isBlockedFrom() instead.
+ $block = $user->getBlock();
+ if ( $block ) {
+ $this->dieBlocked( $block );
}
if ( !$params['ids'] ) {
}
$list->reloadFromMaster();
- // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
for ( $item = $list->reset(); $list->current(); $item = $list->next() ) {
$data['items'][$item->getId()] += $item->getApiData( $this->getResult() );
}