Browse Source

show untitled-[entity-id] in case of message/rfc822 attachments with no
subject.

stekkel 23 years ago
parent
commit
0199204e17
1 changed files with 3 additions and 1 deletions
  1. 3 1
      functions/mime.php

+ 3 - 1
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);