summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-01-28 18:26:56 +0000
committeralecpl <alec@alec.pl>2010-01-28 18:26:56 +0000
commit3e63802071bda6e7e8766542e3cb463bd43f23d2 (patch)
treec89f9494b128a72a3b7fe54c2f7a0d872a304507 /program/include
parent74be739c40eb3146b7a809f2277f07fc0ef65ab8 (diff)
- Don't use dl() (#1486457)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_shared.inc15
1 files changed, 5 insertions, 10 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index e93e9aefe..610023f69 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -444,20 +444,15 @@ function rc_mime_content_type($path, $name, $failover = 'application/octet-strea
$mime_type = $mime_ext[$suffix];
}
// try fileinfo extension if available
- if (!$mime_type) {
- if (!extension_loaded('fileinfo')) {
- @dl('fileinfo.' . PHP_SHLIB_SUFFIX);
- }
- if (function_exists('finfo_open')) {
- if ($finfo = finfo_open(FILEINFO_MIME, $mime_magic)) {
- $mime_type = finfo_file($finfo, $path);
- finfo_close($finfo);
- }
+ if (!$mime_type && function_exists('finfo_open')) {
+ if ($finfo = finfo_open(FILEINFO_MIME, $mime_magic)) {
+ $mime_type = finfo_file($finfo, $path);
+ finfo_close($finfo);
}
}
// try PHP's mime_content_type
if (!$mime_type && function_exists('mime_content_type')) {
- $mime_type = mime_content_type($path);
+ $mime_type = mime_content_type($path);
}
// fall back to user-submitted string
if (!$mime_type) {