diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-12-30 13:09:52 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-12-30 13:09:52 +0100 |
commit | cb0f030ae98a51398bd01e3d5075c8e939d944bc (patch) | |
tree | 9683879e2f596ed01532acc1feeff3ff3c33a679 /program | |
parent | 43382f7c18c0719865381c4bdb9806a0ccafb90c (diff) |
Support "multipart/relative" as an alias for "multipart/related" type (#1488886)
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/Roundcube/rcube_message.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index d450bb439..51b2242df 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -385,7 +385,7 @@ class rcube_message // get html/plaintext parts, other add to attachments list foreach ($structure->parts as $p => $sub_part) { $sub_mimetype = $sub_part->mimetype; - $is_multipart = in_array($sub_mimetype, array('multipart/related', 'multipart/mixed', 'multipart/alternative')); + $is_multipart = preg_match('/^multipart\/(related|relative|mixed|alternative)/', $sub_mimetype); // skip empty text parts if (!$sub_part->size && !$is_multipart) { @@ -560,7 +560,7 @@ class rcube_message continue; // part belongs to a related message and is linked - if ($mimetype == 'multipart/related' + if (preg_match('/^multipart\/(related|relative)/', $mimetype) && ($mail_part->headers['content-id'] || $mail_part->headers['content-location'])) { if ($mail_part->headers['content-id']) $mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']); @@ -599,7 +599,7 @@ class rcube_message } // if this was a related part try to resolve references - if ($mimetype == 'multipart/related' && sizeof($this->inline_parts)) { + if (preg_match('/^multipart\/(related|relative)/', $mimetype) && sizeof($this->inline_parts)) { $a_replaces = array(); $img_regexp = '/^image\/(gif|jpe?g|png|tiff|bmp|svg)/'; |