diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-09-17 19:25:57 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-09-17 19:25:57 +0200 |
commit | e8e2e76ed987d911ec878345e88d3c611a4b7b32 (patch) | |
tree | ae43d047a288e58d7e9c8e3ac8885dc12bc436a2 /program/steps/mail/compose.inc | |
parent | ba3cd80c0c61e679cef92a1f4f51e645090a1472 (diff) | |
parent | 32ba62889c1def94f555c3e683fc8087ee16c9b3 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r-- | program/steps/mail/compose.inc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 29e12675e..04efe7df5 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -1047,15 +1047,23 @@ function rcmail_remove_signature($body) function rcmail_write_compose_attachments(&$message, $bodyIsHtml) { - global $RCMAIL, $COMPOSE; + global $RCMAIL, $COMPOSE, $compose_mode; $cid_map = $messages = array(); foreach ((array)$message->mime_parts as $pid => $part) { - if (($part->ctype_primary != 'message' || !$bodyIsHtml) && $part->ctype_primary != 'multipart' && - ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename) - && $part->mimetype != 'application/ms-tnef' - ) { + if ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename) { + if ($part->ctype_primary == 'message' || $part->ctype_primary == 'multipart') { + continue; + } + if ($part->mimetype == 'application/ms-tnef') { + continue; + } + // skip inline images when forwarding in plain text + if ($part->content_id && !$bodyIsHtml && $compose_mode == RCUBE_COMPOSE_FORWARD) { + continue; + } + $skip = false; if ($part->mimetype == 'message/rfc822') { $messages[] = $part->mime_id; |