X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUndelete.php;h=456facef1216e7cd3d364f747445b5d775597991;hp=529c33185e5d51f76e82c9ed56c22b56a8f95c2c;hb=9189db0c50cd4f755efc1d0ce061f6c04b236a40;hpb=96fa521776235e81bafcaa94e1688e6707a6d486 diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 529c33185e..456facef12 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -95,7 +95,8 @@ class SpecialUndelete extends SpecialPage { $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' ) ) { @@ -456,7 +457,7 @@ class SpecialUndelete extends SpecialPage { Message::rawParam( $link ), $time, Message::rawParam( $userLink ), $d, $t ); - $out->addHtml( '' ); + $out->addHTML( '' ); if ( !Hooks::run( 'UndeleteShowRevision', [ $this->mTargetObj, $rev ] ) ) { return; @@ -503,7 +504,6 @@ class SpecialUndelete extends SpecialPage { ] ); } else { $sourceView = ''; - $previewButton = ''; } $buttonFields[] = new OOUI\ButtonInputWidget( [ @@ -549,7 +549,6 @@ class SpecialUndelete extends SpecialPage { * * @param Revision $previousRev * @param Revision $currentRev - * @return string HTML */ function showDiff( $previousRev, $currentRev ) { $diffContext = clone $this->getContext(); @@ -688,7 +687,7 @@ class SpecialUndelete extends SpecialPage { $repo = RepoGroup::singleton()->getLocalRepo(); $path = $repo->getZonePath( 'deleted' ) . '/' . $repo->getDeletedHashPath( $key ) . $key; - $repo->streamFile( $path ); + $repo->streamFileWithStatus( $path ); } protected function showHistory() {