From: Michael M Slusarz Date: Mon, 2 Nov 2009 17:59:53 +0000 (-0700) Subject: Only show empty message if this is an attachment X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=62b4fd490e281635ce5ebed086df54875695a724;p=horde.git Only show empty message if this is an attachment --- diff --git a/imp/lib/Contents.php b/imp/lib/Contents.php index 806d762e9..b7666fda3 100644 --- a/imp/lib/Contents.php +++ b/imp/lib/Contents.php @@ -390,7 +390,11 @@ class IMP_Contents $mime_part = empty($options['mime_part']) ? $this->getMIMEPart($mime_id) : $options['mime_part']; - $viewer = Horde_Mime_Viewer::factory($mime_part, empty($options['type']) ? null : $options['type']); + $type = empty($options['type']) + ? $mime_part->getType() + : $options['type']; + + $viewer = Horde_Mime_Viewer::factory($mime_part, $type); $viewer->setParams(array('contents' => $this)); if (!empty($options['params'])) { $viewer->setParams($options['params']); @@ -442,7 +446,9 @@ class IMP_Contents $ret[$mime_id]['name'] = $mime_part->getName(true); } - if (($textmode == 'inline') && !strlen($ret[$mime_id]['data'])) { + if (($textmode == 'inline') && + !strlen($ret[$mime_id]['data']) && + $this->isAttachment($type)) { if (empty($ret[$mime_id]['status'])) { $ret[$mime_id]['status'] = array( array(