r72019 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72018‎ | r72019 | r72020 >
Date:09:38, 31 August 2010
Author:daniel
Status:ok
Tags:
Comment:
reverting r71944 as per TheDJ's comment. Will investigate a better way to avoid redundant mime guesses
Modified paths:
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadBase.php
@@ -344,8 +344,9 @@
345345 $this->mFileProps = File::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
346346 $this->checkMacBinary();
347347
348 - $mime = $this->mFileProps[ 'mime' ];
 348+ # magically determine mime type
349349 $magic = MimeMagic::singleton();
 350+ $mime = $magic->guessMimeType( $this->mTempPath, false );
350351
351352 # check mime type, if desired
352353 $status = $this->verifyMimeType( $magic, $mime );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r71944as per r71789: don't guess mime type again, that's expensive. Re-use the valu...daniel12:51, 30 August 2010

Status & tagging log