summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-12-08 15:36:55 +0100
committerThomas Bruederli <thomas@roundcube.net>2012-12-08 15:36:55 +0100
commit3bb75a5cc7a7c77950eeb6070631c9c8b76a5a16 (patch)
tree97fd89ed3dd107dd8e1810b5c6afc38508a03e5c
parentbc1ec6c1a103632e4809bf2ee1c39e486bfe3038 (diff)
Add default path for mime.types file; map jpg => image/jpeg in fallback list
-rw-r--r--program/lib/Roundcube/rcube_mime.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php
index 17cb3f015..4bb5b483f 100644
--- a/program/lib/Roundcube/rcube_mime.php
+++ b/program/lib/Roundcube/rcube_mime.php
@@ -717,6 +717,7 @@ class rcube_mime
$file_paths[] = $mime_types;
// try common locations
+ $file_paths[] = '/etc/mime.types';
$file_paths[] = '/etc/httpd/mime.types';
$file_paths[] = '/etc/httpd2/mime.types';
$file_paths[] = '/etc/apache/mime.types';
@@ -749,7 +750,7 @@ class rcube_mime
// fallback to some well-known types most important for daily emails
if (empty($mime_types)) {
$mime_extensions = @include(RCUBE_CONFIG_DIR . '/mimetypes.php');
- $mime_extensions += array('gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpg', 'jpeg' => 'image/jpeg', 'tif' => 'image/tiff');
+ $mime_extensions += array('gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'tif' => 'image/tiff');
foreach ($mime_extensions as $ext => $mime)
$mime_types[$mime][] = $ext;