@@ 905-911 (lines=7) @@ | ||
902 | // Check if user is allowed to see this file |
|
903 | if ( !$file->exists() ) { |
|
904 | $out->addWikiMsg( 'filedelete-nofile', $this->mFilename ); |
|
905 | } elseif ( !$file->userCan( File::DELETED_FILE, $user ) ) { |
|
906 | if ( $file->isDeleted( File::DELETED_RESTRICTED ) ) { |
|
907 | throw new PermissionsError( 'suppressrevision' ); |
|
908 | } else { |
|
909 | throw new PermissionsError( 'deletedtext' ); |
|
910 | } |
|
911 | } elseif ( !$user->matchEditToken( $this->mToken, $this->mFilename ) ) { |
|
912 | $this->showFileConfirmationForm( $this->mFilename ); |
|
913 | } else { |
|
914 | $this->showFile( $this->mFilename ); |
@@ 313-319 (lines=7) @@ | ||
310 | return; |
|
311 | } |
|
312 | $user = $this->getUser(); |
|
313 | if ( !$oimage->userCan( File::DELETED_FILE, $user ) ) { |
|
314 | if ( $oimage->isDeleted( File::DELETED_RESTRICTED ) ) { |
|
315 | throw new PermissionsError( 'suppressrevision' ); |
|
316 | } else { |
|
317 | throw new PermissionsError( 'deletedtext' ); |
|
318 | } |
|
319 | } |
|
320 | if ( !$user->matchEditToken( $this->token, $archiveName ) ) { |
|
321 | $lang = $this->getLanguage(); |
|
322 | $this->getOutput()->addWikiMsg( 'revdelete-show-file-confirm', |