* type but it's corrupt or data of the wrong type, we should
* probably not accept it.
*/
- $verification = $this->verifyFile( $this->mTempPath );
+ $verification = $this->verifyFile();
if( $verification !== true ) {
if( !is_array( $verification ) )
* @param string $tmpfile the full path of the temporary file to verify
* @return mixed true of the file is verified, a string or array otherwise.
*/
- protected function verifyFile( $tmpfile ) {
+ protected function verifyFile() {
$this->mFileProps = File::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
$this->checkMacBinary();
#magically determine mime type
$magic = MimeMagic::singleton();
- $mime = $magic->guessMimeType( $tmpfile, false );
+ $mime = $magic->guessMimeType( $this->mTempFile, false );
#check mime type, if desired
global $wgVerifyMimeType;
return array( 'filetype-badmime', $mime );
# Check IE type
- $fp = fopen( $tmpfile, 'rb' );
+ $fp = fopen( $this->mTempFile, 'rb' );
$chunk = fread( $fp, 256 );
fclose( $fp );
$extMime = $magic->guessTypesForExtension( $this->mFinalExtension );
}
// only run verifyFile on completed uploaded chunks
- function verifyFile( $tmpFile ){
+ function verifyFile(){
if( $this->chunk_mode == UploadFromChunks::DONE ){
// first append last chunk (so we can do a real verifyFile check... (check file type etc)
$status = $this->doChunkAppend();