From 596301c10bde5e98b6cfdde51be843ffbf087e8d Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Thu, 14 Nov 2013 14:11:13 -0500
Subject: [PATCH] Reset $part_orig_mimetype variable in for-loop. This avoids attachments along with message/rfc822 parts being listed twice

---
 program/lib/Roundcube/rcube_message.php |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 9b662a2..2780076 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -529,8 +529,9 @@
                     $part_mimetype = $mail_part->real_mimetype;
                     list($primary_type, $secondary_type) = explode('/', $part_mimetype);
                 }
-                else
-                    $part_mimetype = $mail_part->mimetype;
+                else {
+                    $part_mimetype = $part_orig_mimetype = $mail_part->mimetype;
+                  }
 
                 // multipart/alternative
                 if ($primary_type == 'multipart') {

--
Gitblit v1.9.1