diff options
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r-- | program/steps/mail/compose.inc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 9b6d0dcc9..751729cc5 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -986,6 +986,8 @@ function rcmail_create_reply_body($body, $bodyIsHtml) ) )); + $reply_mode = intval($RCMAIL->config->get('reply_mode')); + if (!$bodyIsHtml) { $body = preg_replace('/\r?\n/', "\n", $body); $body = trim($body, "\n"); @@ -994,10 +996,13 @@ function rcmail_create_reply_body($body, $bodyIsHtml) $body = rcmail_wrap_and_quote($body, $LINE_LENGTH); $prefix .= "\n"; - $suffix = ''; - if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting + if ($reply_mode > 0) { // top-posting $prefix = "\n\n\n" . $prefix; + $suffix = ''; + } + else { + $suffix = "\n"; } } else { @@ -1012,7 +1017,7 @@ function rcmail_create_reply_body($body, $bodyIsHtml) $prefix = '<p>' . rcube::Q($prefix) . "</p>\n"; $prefix .= '<blockquote>'; - if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting + if ($reply_mode > 0) { // top-posting $prefix = '<br>' . $prefix; $suffix = '</blockquote>'; } @@ -1447,6 +1452,9 @@ function rcmail_compose_subject($attrib) if (isset($_POST['_subject'])) { $subject = rcube_utils::get_input_value('_subject', rcube_utils::INPUT_POST, TRUE); } + else if (!empty($COMPOSE['param']['subject'])) { + $subject = $COMPOSE['param']['subject']; + } // create a reply-subject else if ($compose_mode == RCUBE_COMPOSE_REPLY) { if (preg_match('/^re:/i', $MESSAGE->subject)) @@ -1468,9 +1476,6 @@ function rcmail_compose_subject($attrib) else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { $subject = $MESSAGE->subject; } - else if (!empty($COMPOSE['param']['subject'])) { - $subject = $COMPOSE['param']['subject']; - } $out = $form_start ? "$form_start\n" : ''; $out .= $textfield->show($subject); |