Fix mail with forwarded attachment may not be shown if there's no name assigned

This commit is contained in:
Hadi Nategh 2018-11-26 17:06:19 +01:00
parent ff7c7326f5
commit 377766293f

View File

@ -1730,7 +1730,10 @@ class Mail
$headerObject['ATTACHMENTS'][$mime_id]['uid']=$uid;
$headerObject['ATTACHMENTS'][$mime_id]['cid'] = $cid;
$headerObject['ATTACHMENTS'][$mime_id]['partID']=$mime_id;
if (!isset($headerObject['ATTACHMENTS'][$mime_id]['name']))$headerObject['ATTACHMENTS'][$mime_id]['name']=$part->getName();
if (!isset($headerObject['ATTACHMENTS'][$mime_id]['name']))
{
$headerObject['ATTACHMENTS'][$mime_id]['name']= $part->getName() ? $part->getName() : lang('forwarded message');
}
if (!strcasecmp($headerObject['ATTACHMENTS'][$mime_id]['name'],'winmail.dat') ||
$headerObject['ATTACHMENTS'][$mime_id]['mimeType']=='application/ms-tnef')
{