From a389ffbb46d51d70fda99b1a3e043cd4f3f41ea1 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 02 Apr 2013 13:48:32 -0400
Subject: [PATCH] Skip message/rfc822 attachments only in reply mode
---
program/steps/mail/compose.inc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index cc7cf68..36c6d96 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -997,10 +997,12 @@
foreach ((array)$message->mime_parts as $pid => $part)
{
if ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename) {
- if (($part->ctype_primary == 'message' && $bodyIsHtml) || $part->ctype_primary == 'multipart') {
+ // skip parts that aren't valid attachments
+ if ($part->ctype_primary == 'multipart' || $part->mimetype == 'application/ms-tnef') {
continue;
}
- if ($part->mimetype == 'application/ms-tnef') {
+ // skip message attachments in reply mode
+ if ($part->ctype_primary == 'message' && $compose_mode == RCUBE_COMPOSE_REPLY) {
continue;
}
// skip inline images when forwarding in plain text
--
Gitblit v1.9.1