summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authortill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-11 17:28:02 +0000
committertill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-11 17:28:02 +0000
commita3b187a4188399dcf16693bc569b43f09e60f66c (patch)
treee5bd0294417ac10cf980d817a5cb7ec1b5ff48fa /roundcubemail/program
parent025621e3413009a5fbe276379e64dcb8bd80a0a3 (diff)
* fixing bug (1 attachment gets cut off when you have no text in a draft) -> see #1484673
git-svn-id: https://svn.roundcube.net/trunk@1038 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/mail/compose.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc
index 908bc277e..3e768c868 100644
--- a/roundcubemail/program/steps/mail/compose.inc
+++ b/roundcubemail/program/steps/mail/compose.inc
@@ -562,10 +562,14 @@ function rcmail_create_forward_body($body, $bodyIsHtml)
function rcmail_create_draft_body($body, $bodyIsHtml)
{
global $IMAP, $MESSAGE;
-
- // add attachments
- if (!isset($_SESSION['compose']['forward_attachments']) &&
- is_array($MESSAGE['parts']) && sizeof($MESSAGE['parts'])>1)
+
+ /**
+ * add attachments
+ * sizeof($MESSAGE['parts'] can be 1 - e.g. attachment, but no text!
+ */
+ if (!isset($_SESSION['compose']['forward_attachments'])
+ && is_array($MESSAGE['parts'])
+ && count($MESSAGE['parts']) > 0)
rcmail_write_compose_attachments($MESSAGE);
return $body;