From: Daniel Kinzler Date: Tue, 31 Aug 2010 09:38:11 +0000 (+0000) Subject: reverting r71944 as per TheDJ's comment. Will investigate a better way to avoid redun... X-Git-Tag: 1.31.0-rc.0~35264 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=789baad05764c3a191b816a90a44928373d75de9;p=lhc%2Fweb%2Fwiklou.git reverting r71944 as per TheDJ's comment. Will investigate a better way to avoid redundant mime guesses --- diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 8ad94f5e7a..aa47e1097b 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -344,8 +344,9 @@ abstract class UploadBase { $this->mFileProps = File::getPropsFromPath( $this->mTempPath, $this->mFinalExtension ); $this->checkMacBinary(); - $mime = $this->mFileProps[ 'mime' ]; + # magically determine mime type $magic = MimeMagic::singleton(); + $mime = $magic->guessMimeType( $this->mTempPath, false ); # check mime type, if desired $status = $this->verifyMimeType( $magic, $mime );