fall back to Api\MimeMagic::filename2mime, if mime_content_type function is not available

This commit is contained in:
Ralf Becker 2016-07-12 11:56:42 +02:00
parent 087cff7f25
commit 3bc0dc60d6

View File

@ -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)