From 6cc08d8b2f590379c5d0a9e2905245d2d2f407b4 Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 5 Nov 2002 12:03:24 +0000 Subject: [PATCH] show untitled-[entity-id] in case of message/rfc822 attachments with no subject. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4097 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/mime.php b/functions/mime.php index f68d3717..19fa5a83 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -412,7 +412,9 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { $default_page = '../src/read_body.php'; $rfc822_header = $att->rfc822_header; $filename = decodeHeader($rfc822_header->subject); - + if (trim( $filename ) == '') { + $filename = 'untitled-[' . $ent . ']' ; + } $from_o = $rfc822_header->from; if (is_object($from_o)) { $from_name = $from_o->getAddress(false); -- 2.25.1