* email: fix for text/html attachment was not recognized (neither in list, nor in preview or display) if it is the one and only part of the mail

This commit is contained in:
Klaus Leithoff 2011-11-21 16:37:41 +00:00
parent 2d41bcf631
commit 6bcd5acda1
2 changed files with 3 additions and 1 deletions

View File

@ -2493,7 +2493,7 @@
if (self::$debug) _debug_array($structure);
$attachments = array();
// this kind of messages contain only the attachment and no body
if($structure->type == 'APPLICATION' || $structure->type == 'AUDIO' || $structure->type == 'VIDEO' || $structure->type == 'IMAGE')
if($structure->type == 'APPLICATION' || $structure->type == 'AUDIO' || $structure->type == 'VIDEO' || $structure->type == 'IMAGE' || ($structure->type == 'TEXT' && $structure->disposition == 'ATTACHMENT'))
{
$newAttachment = array();
$newAttachment['name'] = self::getFileNameFromStructure($structure);

View File

@ -363,6 +363,7 @@ class uiwidgets
$header['mimetype'] == 'multipart/related' ||
$header['mimetype'] == 'multipart/report' ||
$header['mimetype'] == 'text/calendar' ||
$header['mimetype'] == 'text/html' ||
substr($header['mimetype'],0,11) == 'application' ||
substr($header['mimetype'],0,5) == 'audio' ||
substr($header['mimetype'],0,5) == 'video')
@ -690,6 +691,7 @@ class uiwidgets
$headerData['mimetype'] == 'multipart/related' ||
$headerData['mimetype'] == 'multipart/report' ||
$headerData['mimetype'] == 'text/calendar' ||
$headerData['mimetype'] == 'text/html' ||
substr($headerData['mimetype'],0,11) == 'application' ||
substr($headerData['mimetype'],0,5) == 'audio' ||
substr($headerData['mimetype'],0,5) == 'video')