From 63d6e6dfc35e6d82c4a64f37c408794c163becd4 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 28 Sep 2011 15:16:41 -0400
Subject: [PATCH] Bump versions to 0.6 stable

---
 program/include/rcube_message.php |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index 4f9a2f2..20cecf1 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -286,7 +286,7 @@
         if ($message_ctype_primary == 'text' && !$recursive) {
             $structure->type = 'content';
             $this->parts[] = &$structure;
-            
+
             // Parse simple (plain text) message body
             if ($message_ctype_secondary == 'plain')
                 foreach ((array)$this->uu_decode($structure) as $uupart) {
@@ -306,7 +306,7 @@
 
             foreach ($structure->parts as $p => $sub_part) {
                 $sub_mimetype = $sub_part->mimetype;
-        
+
                 // check if sub part is
                 if ($sub_mimetype == 'text/plain')
                     $plain_part = $p;
@@ -323,7 +323,7 @@
                 $this->parse_alternative = true;
                 $this->parse_structure($structure->parts[$related_part], true);
                 $this->parse_alternative = false;
-        
+
                 // if plain part was found, we should unset it if html is preferred
                 if ($this->opt['prefer_html'] && count($this->parts))
                     $plain_part = null;
@@ -373,6 +373,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)) {
@@ -432,7 +434,7 @@
                         $this->attachments[] = $mail_part;
                 }
                 // part message/*
-                else if ($primary_type=='message') {
+                else if ($primary_type == 'message') {
                     $this->parse_structure($mail_part, true);
 
                     // list as attachment as well (mostly .eml)
@@ -496,6 +498,10 @@
                         $this->attachments[] = $mail_part;
                     }
                 }
+                // attachment part as message/rfc822 (#1488026)
+                else if ($mail_part->mimetype == 'message/rfc822') {
+                    $this->parse_structure($mail_part);
+                }
             }
 
             // if this was a related part try to resolve references

--
Gitblit v1.9.1