File->getEnclosure improvements (text/html is not an attachment)

This commit is contained in:
Mikael Nordfeldth
2014-08-05 10:54:00 +02:00
parent 33a85ae945
commit 17b9614ff8
2 changed files with 23 additions and 23 deletions

View File

@@ -1820,6 +1820,15 @@ function common_get_mime_media($type)
return strtolower($tmp[0]);
}
function common_bare_mime($mimetype)
{
$mimetype = mb_strtolower($mimetype);
if ($semicolon = mb_strpos($mimetype, ';')) {
$mimetype = mb_substr($mimetype, 0, $semicolon);
}
return $mimetype;
}
function common_mime_type_match($type, $avail)
{
if(array_key_exists($type, $avail)) {