Explorar o código

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

stekkel %!s(int64=23) %!d(string=hai) anos
pai
achega
0199204e17
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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);