From: Domas Mituzas Date: Fri, 18 Feb 2005 12:51:33 +0000 (+0000) Subject: don't verify already stashed files X-Git-Tag: 1.5.0alpha1~720 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=d802c6fe9174767da120a7261854ecb4336509a4;p=lhc%2Fweb%2Fwiklou.git don't verify already stashed files --- diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index 23cd7a7944..2a9bd399e3 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -31,7 +31,7 @@ class UploadForm { var $mUploadAffirm, $mUploadFile, $mUploadDescription, $mIgnoreWarning; var $mUploadSaveName, $mUploadTempName, $mUploadSize, $mUploadOldVersion; var $mUploadCopyStatus, $mUploadSource, $mReUpload, $mAction, $mUpload; - var $mOname, $mSessionKey; + var $mOname, $mSessionKey, $mStashed; /**#@-*/ /** @@ -69,6 +69,7 @@ class UploadForm { $this->mUploadTempName = $data['mUploadTempName']; $this->mUploadSize = $data['mUploadSize']; $this->mOname = $data['mOname']; + $this->mStashed = true; } else { /** *Check for a newly uploaded file. @@ -77,6 +78,7 @@ class UploadForm { $this->mUploadSize = $request->getFileSize( 'wpUploadFile' ); $this->mOname = $request->getFileName( 'wpUploadFile' ); $this->mSessionKey = false; + $this->mStashed = false; } } @@ -207,7 +209,7 @@ class UploadForm { * type but it's corrupt or data of the wrong type, we should * probably not accept it. */ - if( !$this->verify( $this->mUploadTempName, $finalExt ) ) { + if( !$this->mStashed && !$this->verify( $this->mUploadTempName, $finalExt ) ) { return $this->uploadError( wfMsg( 'uploadcorrupt' ) ); }