summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-06-16 08:06:53 +0000
committeralecpl <alec@alec.pl>2008-06-16 08:06:53 +0000
commit1bc48e3ee8d7bc73ed384803309f04c0068eafcc (patch)
treefacf1372eeb4bc3ef18e5eac45dda738a595daeb
parent33ca143ae599fff13b2584987cf0e098ca4da573 (diff)
- Fixed forwarding messages with one HTML attachment (#1484442)
- Fixed encoding of message/rfc822 attachments and image/pjpeg handling (#1484914)
-rw-r--r--CHANGELOG6
-rw-r--r--program/steps/mail/compose.inc8
2 files changed, 10 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 66e063372..d0a7e7505 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,12 @@
CHANGELOG RoundCube Webmail
---------------------------
+2008/06/16 (alec)
+----------
+- Fixed sending emoticons
+- Fixed forwarding messages with one HTML attachment (#1484442)
+- Fixed encoding of message/rfc822 attachments and image/pjpeg handling (#1484914)
+
2008/06/15 (alec)
----------
- Added option to select skin in user preferences
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 855066b0c..0bfcaf2cd 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -522,7 +522,7 @@ function rcmail_create_forward_body($body, $bodyIsHtml)
// add attachments
if (!isset($_SESSION['compose']['forward_attachments']) && is_array($MESSAGE->mime_parts))
- rcmail_write_compose_attachments($MESSAGE);
+ rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml);
return $prefix.$body;
}
@@ -539,13 +539,13 @@ function rcmail_create_draft_body($body, $bodyIsHtml)
if (!isset($_SESSION['compose']['forward_attachments'])
&& is_array($MESSAGE->mime_parts)
&& count($MESSAGE->mime_parts) > 0)
- rcmail_write_compose_attachments($MESSAGE);
+ rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml);
return $body;
}
-function rcmail_write_compose_attachments(&$message)
+function rcmail_write_compose_attachments(&$message, $bodyIsHtml)
{
global $RCMAIL, $IMAP;
@@ -556,7 +556,7 @@ function rcmail_write_compose_attachments(&$message)
foreach ((array)$message->mime_parts as $pid => $part)
{
- if ($part->ctype_primary != 'message' &&
+ if (($part->ctype_primary != 'message' || !$bodyIsHtml) &&
($part->disposition=='attachment' || $part->disposition=='inline' || $part->headers['content-id'] ||
(empty($part->disposition) && $part->filename)))
{