summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_message.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-03-13 19:02:42 +0100
committerThomas Bruederli <thomas@roundcube.net>2013-03-13 19:02:42 +0100
commitbfa667ab022c3efa1b7da8bd2ffe27dcf8959c79 (patch)
treeeb114df31be562e9493ab2d32891a4f87cc5e886 /program/lib/Roundcube/rcube_message.php
parentd4f8a4f28a49b2fd92c398b4df3d0a0e3059c091 (diff)
parentf41edfb91f377d2bcede8d28662fb1aedf87ce37 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/lib/Roundcube/rcube_message.php')
-rw-r--r--program/lib/Roundcube/rcube_message.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 60161a419..3f14266d4 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -210,18 +210,20 @@ class rcube_message
if (!$recursive) {
$level = explode('.', $part->mime_id);
- // Skip if level too deep or part has a file name
- if (count($level) > 2 || $part->filename) {
+ // Skip if part is an attachment
+ if ($this->is_attachment($part)) {
continue;
}
- // HTML part can be on the lower level, if not...
- if (count($level) > 1) {
- array_pop($level);
+ // Check if the part belongs to higher-level's alternative/related
+ while (array_pop($level) !== null) {
+ if (!count($level)) {
+ return true;
+ }
+
$parent = $this->mime_parts[join('.', $level)];
- // ... parent isn't multipart/alternative or related
if ($parent->mimetype != 'multipart/alternative' && $parent->mimetype != 'multipart/related') {
- continue;
+ continue 2;
}
}
}