Merge "Fix unused vars/pointless assignments"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 2 Apr 2019 03:06:56 +0000 (03:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 2 Apr 2019 03:06:56 +0000 (03:06 +0000)
1  2 
includes/specials/SpecialUndelete.php

@@@ -95,8 -95,7 +95,8 @@@ class SpecialUndelete extends SpecialPa
                $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 {
                        $sourceView = '';
-                       $previewButton = '';
                }
  
                $buttonFields[] = new OOUI\ButtonInputWidget( [