Просмотр исходного кода

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

stekkel 23 лет назад
Родитель
Сommit
0199204e17
1 измененных файлов с 3 добавлено и 1 удалено
  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';
             $default_page = '../src/read_body.php';
             $rfc822_header = $att->rfc822_header;
             $rfc822_header = $att->rfc822_header;
             $filename = decodeHeader($rfc822_header->subject);
             $filename = decodeHeader($rfc822_header->subject);
-
+            if (trim( $filename ) == '') {
+                $filename = 'untitled-[' . $ent . ']' ;
+	    }		
             $from_o = $rfc822_header->from;
             $from_o = $rfc822_header->from;
             if (is_object($from_o)) {
             if (is_object($from_o)) {
                 $from_name = $from_o->getAddress(false);
                 $from_name = $from_o->getAddress(false);