From 24c91ed78e64cb20b2ba08971d2c35979a2de856 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 20 May 2010 04:04:25 -0400
Subject: [PATCH] - Moved error.inc to /utils - Removed bugs.inc (content copied into main.inc)
---
program/include/rcube_message.php | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index 1095a2a..05b0151 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -15,7 +15,7 @@
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
- $Id: rcube_imap.php 1344 2008-04-30 08:21:42Z thomasb $
+ $Id$
*/
@@ -393,7 +393,7 @@
// ignore "virtual" protocol parts
else if ($primary_type == 'protocol')
continue;
-
+
// part is Microsoft Outlook TNEF (winmail.dat)
else if ($part_mimetype == 'application/ms-tnef') {
foreach ((array)$this->imap->tnef_decode($mail_part, $structure->headers['uid']) as $tnef_part) {
@@ -401,7 +401,6 @@
$this->attachments[] = $tnef_part;
}
}
-
// part is a file/attachment
else if (preg_match('/^(inline|attach)/', $mail_part->disposition) ||
$mail_part->headers['content-id'] || (empty($mail_part->disposition) && $mail_part->filename)) {
@@ -418,11 +417,15 @@
$mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']);
if ($mail_part->headers['content-location'])
$mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location'];
-
+
$this->inline_parts[] = $mail_part;
}
+ // attachment encapsulated within message/rfc822 part needs further decoding (#1486743)
+ else if ($part_orig_mimetype == 'message/rfc822') {
+ $this->parse_structure($mail_part, true);
+ }
// is a regular attachment
- else if (preg_match('!^[a-z]+/[a-z0-9-.+]+$!i', $part_mimetype)) {
+ else if (preg_match('!^[a-z0-9-.+]+/[a-z0-9-.+]+$!i', $part_mimetype)) {
if (!$mail_part->filename)
$mail_part->filename = 'Part '.$mail_part->mime_id;
$this->attachments[] = $mail_part;
--
Gitblit v1.9.1