From 00d42426f2fcf7f3451d4f6745d7f9f79feaaeba Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Mon, 26 Sep 2011 03:36:24 -0400
Subject: [PATCH] Fix merging of annotation results when querying multiple attributes
---
program/include/rcube_message.php | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index 2ec386c..e0c49f8 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -299,8 +299,10 @@
$structure->type = 'content';
$this->parts[] = &$structure;
}
- // message contains alternative parts
- else if ($mimetype == 'multipart/alternative' && is_array($structure->parts)) {
+ // message contains (more than one!) alternative parts
+ else if ($mimetype == 'multipart/alternative'
+ && is_array($structure->parts) && count($structure->parts) > 1
+ ) {
// get html/plaintext parts
$plain_part = $html_part = $print_part = $related_part = null;
@@ -373,6 +375,8 @@
$p->ctype_secondary = 'plain';
$p->body = rcube_label('encryptedmessage');
$p->size = strlen($p->body);
+
+ $this->parts[] = $p;
}
// message contains multiple parts
else if (is_array($structure->parts) && !empty($structure->parts)) {
--
Gitblit v1.9.1