summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-09-03 06:49:00 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-09-03 06:49:00 +0000
commitef35eba5b3daf2ccbcb43c939e172e29ccb62a67 (patch)
tree79052ecf3b340c64056552941a1849c0e9fa1aee /roundcubemail/program/steps/mail
parentd55777ebef19c351f3fc9d9d5b11118ca3b978fe (diff)
- Fix editor type doesn't match type of message body content (#1486080)
git-svn-id: https://svn.roundcube.net/trunk@2909 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
-rw-r--r--roundcubemail/program/steps/mail/compose.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc
index 2565d46f1..79a95dbcf 100644
--- a/roundcubemail/program/steps/mail/compose.inc
+++ b/roundcubemail/program/steps/mail/compose.inc
@@ -393,7 +393,7 @@ function rcmail_compose_body($attrib)
$attrib['name'] = '_message';
- if ($CONFIG['htmleditor'] || (($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) && $MESSAGE->first_html_part()))
+ if ($CONFIG['htmleditor'] || (($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) && $MESSAGE->has_html_part()))
$isHtml = true;
else
$isHtml = false;
@@ -422,7 +422,7 @@ function rcmail_compose_body($attrib)
$body = $MESSAGE->first_text_part();
$isHtml = false;
}
-
+
// compose reply-body
if ($compose_mode == RCUBE_COMPOSE_REPLY)
$body = rcmail_create_reply_body($body, $isHtml);
@@ -911,10 +911,11 @@ function rcmail_editor_selector($attrib)
global $CONFIG, $MESSAGE, $compose_mode;
// determine whether HTML or plain text should be checked
- $useHtml = $CONFIG['htmleditor'] ? true : false;
-
if ($compose_mode)
- $useHtml = ($useHtml && $MESSAGE->has_html_part());
+ $useHtml = (($CONFIG['htmleditor'] || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT)
+ && $MESSAGE->has_html_part());
+ else
+ $useHtml = $CONFIG['htmleditor'] ? true : false;
if (empty($attrib['editorid']))
$attrib['editorid'] = 'rcmComposeBody';