| | |
| | | $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'; |
| | |
| | | // 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; |