Merge "Remove OutputPage::addWikitext()* functions, hard-deprecated in 1.32"
[lhc/web/wiklou.git] / includes / specials / SpecialRevisionDelete.php
index f0bac45..682bceb 100644 (file)
@@ -123,8 +123,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $user = $this->getUser();
 
                // Check blocks
-               if ( $user->isBlocked() ) {
-                       throw new UserBlockedError( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       throw new UserBlockedError( $block );
                }
 
                $this->setHeaders();
@@ -353,7 +355,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
 
                $key = $oimage->getStorageKey();
                $path = $repo->getZonePath( 'deleted' ) . '/' . $repo->getDeletedHashPath( $key ) . $key;
-               $repo->streamFile( $path );
+               $repo->streamFileWithStatus( $path );
        }
 
        /**