$this->mUnsuppress = $request->getVal( 'wpUnsuppress' ) && $user->isAllowed( 'suppressrevision' );
$this->mToken = $request->getVal( 'token' );
- if ( $this->isAllowed( 'undelete' ) && !$user->isBlocked() ) {
+ $block = $user->getBlock();
+ if ( $this->isAllowed( 'undelete' ) && !( $block && $block->isSitewide() ) ) {
$this->mAllowed = true; // user can restore
$this->mCanView = true; // user can view content
} elseif ( $this->isAllowed( 'deletedtext' ) ) {
} else {
$this->showFile( $this->mFilename );
}
- } elseif ( $this->mAction === "submit" ) {
+ } elseif ( $this->mAction === 'submit' ) {
if ( $this->mRestore ) {
$this->undelete();
} elseif ( $this->mRevdel ) {
foreach ( $this->getRequest()->getValues() as $key => $val ) {
$matches = [];
if ( preg_match( "/^ts(\d{14})$/", $key, $matches ) ) {
- $revisions[ $archive->getRevision( $matches[1] )->getId() ] = 1;
+ $revisions[$archive->getRevision( $matches[1] )->getId()] = 1;
}
}
+
$query = [
- "type" => "revision",
- "ids" => $revisions,
- "target" => $this->mTargetObj->getPrefixedText()
+ 'type' => 'revision',
+ 'ids' => $revisions,
+ 'target' => $this->mTargetObj->getPrefixedText()
];
$url = SpecialPage::getTitleFor( 'Revisiondelete' )->getFullURL( $query );
$this->getOutput()->redirect( $url );
Message::rawParam( $link ), $time,
Message::rawParam( $userLink ), $d, $t
);
- $out->addHtml( '</div>' );
+ $out->addHTML( '</div>' );
if ( !Hooks::run( 'UndeleteShowRevision', [ $this->mTargetObj, $rev ] ) ) {
return;