From: Michael M Slusarz Date: Mon, 16 Nov 2009 22:41:04 +0000 (-0700) Subject: Make sure there is some text displayed for the name entry X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=361d4c3b6e08119def4bc7d2efdd3f1c0724b95d;p=horde.git Make sure there is some text displayed for the name entry --- diff --git a/imp/lib/Message.php b/imp/lib/Message.php index 51601d343..3821c48ed 100644 --- a/imp/lib/Message.php +++ b/imp/lib/Message.php @@ -528,8 +528,9 @@ class IMP_Message $newPart->setDisposition('attachment'); /* We need to make sure all text is in the correct charset. */ + $part_name = $oldPart->getName(true); $newPart->setCharset(Horde_Nls::getCharset()); - $newPart->setContents(sprintf(_("[Attachment stripped: Original attachment type: %s, name: %s]"), $oldPart->getType(), $oldPart->getName(true))); + $newPart->setContents(sprintf(_("[Attachment stripped: Original attachment type: %s, name: %s]"), $oldPart->getType(), $part_name ? $part_name : _("unnamed"))); $message->alterPart($partid, $newPart); }