removed displaying attachments in case we are dealing with
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 28 May 2002 21:27:19 +0000 (21:27 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 28 May 2002 21:27:19 +0000 (21:27 +0000)
multipart/alternative or multipart/related messages.

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

functions/mime.php

index 6e11b1d..61e3457 100644 (file)
@@ -811,7 +811,13 @@ function formatBody($imap_stream, $message, $color, $wrap_at) {
 
         /** Display the ATTACHMENTS: message if there's more than one part **/
         if (isset($message->entities[1])) {
-            $body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
+           /* Header-type alternative means we choose the best one to display 
+              so don't show the alternatives as attachment. Header-type related
+              means that the attachments are already part of the related message.
+           */   
+           if ($message->header->type1 !='related' && $message->header->type1 !='alternative') {
+               $body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
+           }
         }
     } else {
         $body = formatAttachments ($message, -1, $message->header->mailbox, $id);