show untitled-[entity-id] in case of message/rfc822 attachments with no
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 5 Nov 2002 12:03:24 +0000 (12:03 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 5 Nov 2002 12:03:24 +0000 (12:03 +0000)
subject.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4097 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index f68d371..19fa5a8 100644 (file)
@@ -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);