Stop calling FileRepo->streamFile()
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index bfa39d1..456face 100644 (file)
@@ -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' ) ) {
@@ -548,7 +549,6 @@ class SpecialUndelete extends SpecialPage {
         *
         * @param Revision $previousRev
         * @param Revision $currentRev
-        * @return string HTML
         */
        function showDiff( $previousRev, $currentRev ) {
                $diffContext = clone $this->getContext();
@@ -687,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() {