From: Brion Vibber Date: Tue, 14 Jun 2011 21:47:23 +0000 (+0000) Subject: Followup to r86347, r86797: change SpecialUndelete->mFile to mFilename to remove... X-Git-Tag: 1.31.0-rc.0~29529 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=f756c92df5e4275cb49e1f5322011f8664a1b8a5;p=lhc%2Fweb%2Fwiklou.git Followup to r86347, r86797: change SpecialUndelete->mFile to mFilename to remove conflict with SpecialPage->mFile which carries different data and is now private. --- diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index b9dc747f54..028b28d2ef 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -570,7 +570,7 @@ class PageArchive { * @ingroup SpecialPage */ class SpecialUndelete extends SpecialPage { - var $mAction, $mTarget, $mTimestamp, $mRestore, $mInvert, $mFile; + var $mAction, $mTarget, $mTimestamp, $mRestore, $mInvert, $mFilename; var $mTargetTimestamp, $mAllowed, $mCanView, $mComment, $mToken, $mRequest; /** @@ -596,7 +596,7 @@ class SpecialUndelete extends SpecialPage { $this->mSearchPrefix = $this->mRequest->getText( 'prefix' ); $time = $this->mRequest->getVal( 'timestamp' ); $this->mTimestamp = $time ? wfTimestamp( TS_MW, $time ) : ''; - $this->mFile = $this->mRequest->getVal( 'file' ); + $this->mFilename = $this->mRequest->getVal( 'file' ); $posted = $this->mRequest->wasPosted() && $wgUser->matchEditToken( $this->mRequest->getVal( 'wpEditToken' ) ); @@ -685,11 +685,11 @@ class SpecialUndelete extends SpecialPage { if( $this->mTimestamp !== '' ) { return $this->showRevision( $this->mTimestamp ); } - if( $this->mFile !== null ) { - $file = new ArchivedFile( $this->mTargetObj, '', $this->mFile ); + if( $this->mFilename !== null ) { + $file = new ArchivedFile( $this->mTargetObj, '', $this->mFilename ); // Check if user is allowed to see this file if ( !$file->exists() ) { - $wgOut->addWikiMsg( 'filedelete-nofile', $this->mFile ); + $wgOut->addWikiMsg( 'filedelete-nofile', $this->mFilename ); return; } else if( !$file->userCan( File::DELETED_FILE ) ) { if( $file->isDeleted( File::DELETED_RESTRICTED ) ) { @@ -698,11 +698,11 @@ class SpecialUndelete extends SpecialPage { $wgOut->permissionRequired( 'deletedtext' ); } return false; - } elseif ( !$wgUser->matchEditToken( $this->mToken, $this->mFile ) ) { - $this->showFileConfirmationForm( $this->mFile ); + } elseif ( !$wgUser->matchEditToken( $this->mToken, $this->mFilename ) ) { + $this->showFileConfirmationForm( $this->mFilename ); return false; } else { - return $this->showFile( $this->mFile ); + return $this->showFile( $this->mFilename ); } } if( $this->mRestore && $this->mAction == 'submit' ) { @@ -1024,7 +1024,7 @@ class SpecialUndelete extends SpecialPage { */ private function showFileConfirmationForm( $key ) { global $wgOut, $wgUser, $wgLang; - $file = new ArchivedFile( $this->mTargetObj, '', $this->mFile ); + $file = new ArchivedFile( $this->mTargetObj, '', $this->mFilename ); $wgOut->addWikiMsg( 'undelete-show-file-confirm', $this->mTargetObj->getText(), $wgLang->date( $file->getTimestamp() ),