summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_message.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-08-30 09:10:27 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-08-30 09:10:27 +0000
commit13693a2aaacf84a3ae04a23baa590394864ed0a4 (patch)
tree7e4206e87a991157c1e78655211426801b4d9d73 /roundcubemail/program/include/rcube_message.php
parent0deb8933300b892b29e1b07bbb95ed776c33a387 (diff)
- Fix handling of attachments inside message/rfc822 parts (#1488026)
git-svn-id: https://svn.roundcube.net/trunk@5149 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_message.php')
-rw-r--r--roundcubemail/program/include/rcube_message.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcube_message.php b/roundcubemail/program/include/rcube_message.php
index 4f9a2f230..4e2595550 100644
--- a/roundcubemail/program/include/rcube_message.php
+++ b/roundcubemail/program/include/rcube_message.php
@@ -286,7 +286,7 @@ class rcube_message
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 @@ class rcube_message
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 @@ class rcube_message
$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;
@@ -432,7 +432,7 @@ class rcube_message
$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 +496,10 @@ class rcube_message
$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