Index: trunk/phase3/includes/upload/UploadFromStash.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | /** |
58 | 58 | * File has been previously verified so no need to do so again. |
59 | 59 | */ |
60 | | - protected function verifyFile( $tmpfile ) { |
| 60 | + protected function verifyFile() { |
61 | 61 | return true; |
62 | 62 | } |
63 | 63 | |
Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -170,7 +170,7 @@ |
171 | 171 | * type but it's corrupt or data of the wrong type, we should |
172 | 172 | * probably not accept it. |
173 | 173 | */ |
174 | | - $verification = $this->verifyFile( $this->mTempPath ); |
| 174 | + $verification = $this->verifyFile(); |
175 | 175 | |
176 | 176 | if( $verification !== true ) { |
177 | 177 | if( !is_array( $verification ) ) |
— | — | @@ -196,13 +196,13 @@ |
197 | 197 | * @param string $tmpfile the full path of the temporary file to verify |
198 | 198 | * @return mixed true of the file is verified, a string or array otherwise. |
199 | 199 | */ |
200 | | - protected function verifyFile( $tmpfile ) { |
| 200 | + protected function verifyFile() { |
201 | 201 | $this->mFileProps = File::getPropsFromPath( $this->mTempPath, $this->mFinalExtension ); |
202 | 202 | $this->checkMacBinary(); |
203 | 203 | |
204 | 204 | #magically determine mime type |
205 | 205 | $magic = MimeMagic::singleton(); |
206 | | - $mime = $magic->guessMimeType( $tmpfile, false ); |
| 206 | + $mime = $magic->guessMimeType( $this->mTempFile, false ); |
207 | 207 | |
208 | 208 | #check mime type, if desired |
209 | 209 | global $wgVerifyMimeType; |
— | — | @@ -212,7 +212,7 @@ |
213 | 213 | return array( 'filetype-badmime', $mime ); |
214 | 214 | |
215 | 215 | # Check IE type |
216 | | - $fp = fopen( $tmpfile, 'rb' ); |
| 216 | + $fp = fopen( $this->mTempFile, 'rb' ); |
217 | 217 | $chunk = fread( $fp, 256 ); |
218 | 218 | fclose( $fp ); |
219 | 219 | $extMime = $magic->guessTypesForExtension( $this->mFinalExtension ); |
Index: trunk/phase3/includes/upload/UploadFromChunks.php |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | } |
90 | 90 | |
91 | 91 | // only run verifyFile on completed uploaded chunks |
92 | | - function verifyFile( $tmpFile ){ |
| 92 | + function verifyFile(){ |
93 | 93 | if( $this->chunk_mode == UploadFromChunks::DONE ){ |
94 | 94 | // first append last chunk (so we can do a real verifyFile check... (check file type etc) |
95 | 95 | $status = $this->doChunkAppend(); |