Follow-up to r71944: Interoducing MimeMagic::improveTypeFromExtension() for two reasons:
authorDaniel Kinzler <daniel@users.mediawiki.org>
Tue, 31 Aug 2010 13:47:24 +0000 (13:47 +0000)
committerDaniel Kinzler <daniel@users.mediawiki.org>
Tue, 31 Aug 2010 13:47:24 +0000 (13:47 +0000)
commit1917b3b1bdfe84b6a4893cfdb1535b05cf6e3be3
treef2fe9e8c962721d17fab1ba4db79fed1e5e71700
parenta4e6acb2884da7fe40bcc228de9ba1235954228f
Follow-up to r71944: Interoducing MimeMagic::improveTypeFromExtension() for two reasons:
a) avoid redundant inspection of file contents when validating uploads, caused by multiple calls to guessMimeType
b) deprecated obscure use of the file extension when guessing mime types, using an explicit call to improveTypeFromExtension() instead

Note that File::getPropsFromPath() will now return an additional field: $props['file-mime'] contains the mime type as determined solely from the file's content, $props['mime'] contains the type that was derived considering the file extension too.
includes/MimeMagic.php
includes/filerepo/File.php
includes/upload/UploadBase.php