Forráskód Böngészése

get the filename from the properties if the is no disposition info available
in the bodystructure.

stekkel 22 éve
szülő
commit
f3b443c708
1 módosított fájl, 9 hozzáadás és 7 törlés
  1. 9 7
      functions/mime.php

+ 9 - 7
functions/mime.php

@@ -442,13 +442,15 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) {
                     }
                 }
             } else {
-                if (trim( $header->id ) == '') {
-                    $filename = 'untitled-[' . $ent . ']' ;
-                } else {
-                    $filename = 'cid: ' . $header->id;
-                }
-            }
-
+		$filename = decodeHeader($header->getParameter('name'));
+		if (!trim($filename)) {
+            	    if (trim( $header->id ) == '') {
+                	$filename = 'untitled-[' . $ent . ']' ;
+            	    } else {
+                	$filename = 'cid: ' . $header->id;
+            	    }
+        	}
+	    }
             if ($header->description) {
                 $description = htmlspecialchars($header->description);
             } else {