From 80815d23e596528642a9321eb694715530d6f1d6 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Thu, 03 Sep 2009 02:49:00 -0400 Subject: [PATCH] - Fix editor type doesn't match type of message body content (#1486080) --- program/steps/mail/compose.inc | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 2565d46..79a95db 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -393,7 +393,7 @@ $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 @@ $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 @@ 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'; -- Gitblit v1.9.1