From 5e5a76c4c2c78651015b5ce6437222dec0db2d85 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 12 Jul 2016 11:56:42 +0200 Subject: [PATCH] fall back to Api\MimeMagic::filename2mime, if mime_content_type function is not available --- api/thumbnail.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api/thumbnail.php b/api/thumbnail.php index e37bc6b0db..6530f991db 100644 --- a/api/thumbnail.php +++ b/api/thumbnail.php @@ -183,7 +183,14 @@ function read_thumbnail($src) list(, $path) = explode($GLOBALS['egw_info']['server']['webserver_url'], Api\Image::find($app, $icon), 2); $dst = EGW_SERVER_ROOT.$path; - $output_mime = mime_content_type($dst); + if (function_exist('mime_content_type')) + { + $output_mime = mime_content_type($dst); + } + else + { + $output_mime = Api\MimeMagic::filename2mime($dst); + } } if ($dst)