From 5fbfde8fdf53d54dbaf7883c10ed275ebe3a921c Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 17 Oct 2012 04:35:10 -0400
Subject: [PATCH] Fix the fix for empty text parts handling (#1488757)

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

diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index 7bf95d1..4e1b5a0 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -371,9 +371,10 @@
             foreach ($structure->parts as $p => $sub_part) {
                 $sub_mimetype = $sub_part->mimetype;
 
-                // skip empty parts
-                if (!$sub_part->size)
+                // skip empty text parts
+                if (!$sub_part->size && preg_match('#^text/(plain|html|enriched)$#', $sub_mimetype)) {
                     continue;
+                }
 
                 // check if sub part is
                 if ($sub_mimetype == 'text/plain')

--
Gitblit v1.9.1