| @@ 311-317 (lines=7) @@ | ||
| 308 | return; |
|
| 309 | } |
|
| 310 | $user = $this->getUser(); |
|
| 311 | if ( !$oimage->userCan( File::DELETED_FILE, $user ) ) { |
|
| 312 | if ( $oimage->isDeleted( File::DELETED_RESTRICTED ) ) { |
|
| 313 | throw new PermissionsError( 'suppressrevision' ); |
|
| 314 | } else { |
|
| 315 | throw new PermissionsError( 'deletedtext' ); |
|
| 316 | } |
|
| 317 | } |
|
| 318 | if ( !$user->matchEditToken( $this->token, $archiveName ) ) { |
|
| 319 | $lang = $this->getLanguage(); |
|
| 320 | $this->getOutput()->addWikiMsg( 'revdelete-show-file-confirm', |
|
| @@ 832-838 (lines=7) @@ | ||
| 829 | // Check if user is allowed to see this file |
|
| 830 | if ( !$file->exists() ) { |
|
| 831 | $out->addWikiMsg( 'filedelete-nofile', $this->mFilename ); |
|
| 832 | } elseif ( !$file->userCan( File::DELETED_FILE, $user ) ) { |
|
| 833 | if ( $file->isDeleted( File::DELETED_RESTRICTED ) ) { |
|
| 834 | throw new PermissionsError( 'suppressrevision' ); |
|
| 835 | } else { |
|
| 836 | throw new PermissionsError( 'deletedtext' ); |
|
| 837 | } |
|
| 838 | } elseif ( !$user->matchEditToken( $this->mToken, $this->mFilename ) ) { |
|
| 839 | $this->showFileConfirmationForm( $this->mFilename ); |
|
| 840 | } else { |
|
| 841 | $this->showFile( $this->mFilename ); |
|