Browse Source

Merge pull request #336 from adam-vessey/7.x-image-tif-mimetype

Add handling of deprecated 'image/tif' mimetype when determining an extension.
pull/332/merge
Jonathan Green 12 years ago
parent
commit
17ac8e41b8
  1. 6
      includes/mime_detect.inc

6
includes/mime_detect.inc

@ -194,6 +194,11 @@ class MimeDetect {
'bin' => 'application/octet-stream',
);
protected $protectedFileExtensions;
protected $extensionExceptions = array(
// XXX: Deprecated... Only here due to old 'tif' => 'image/tif' mapping...
// The correct MIMEtype is 'image/tiff'.
'image/tif' => 'tif',
);
protected $systemTypes;
protected $systemExts;
protected $etcMimeTypes = '/etc/mime.types';
@ -205,6 +210,7 @@ class MimeDetect {
// Populate the reverse shortlist:
$this->protectedFileExtensions = array_flip($this->protectedMimeTypes);
$this->protectedFileExtensions += $this->extensionExceptions;
// Pick up a local mime.types file if it is available.
if (is_readable('mime.types')) {

Loading…
Cancel
Save