summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-26 18:20:28 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-26 18:20:28 +0200
commit651c7b6e9df38a3b7cdf6daebed39021d88c3bea (patch)
treebac0d18414e6e4b7a5f2ad7ba37403c5bf5a65b9 /program/steps/mail
parent4877dbd4d2ca63d7f6b8857abcb4d2f895f2542e (diff)
Add option to not include original message on reply, rename option top_posting to reply_mode (#1485149)
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/compose.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 56f4a052b..c243c887e 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -139,7 +139,7 @@ if (!empty($CONFIG['drafts_mbox'])) {
// set current mailbox in client environment
$OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder());
$OUTPUT->set_env('sig_above', $RCMAIL->config->get('sig_above', false));
-$OUTPUT->set_env('top_posting', $RCMAIL->config->get('top_posting', false));
+$OUTPUT->set_env('top_posting', intval($RCMAIL->config->get('reply_mode')) > 0);
$OUTPUT->set_env('recipients_separator', trim($RCMAIL->config->get('recipients_separator', ',')));
// default font for HTML editor
@@ -641,7 +641,7 @@ function rcmail_prepare_message_body()
rcmail_write_forward_attachment($MESSAGE);
}
// reply/edit/draft/forward
- else if ($compose_mode) {
+ else if ($compose_mode && ($compose_mode != RCUBE_COMPOSE_REPLY || $RCMAIL->config->get('reply_mode') != -1)) {
$isHtml = rcmail_compose_editor_mode();
if (!empty($MESSAGE->parts)) {
@@ -906,8 +906,9 @@ function rcmail_create_reply_body($body, $bodyIsHtml)
$prefix .= "\n";
$suffix = '';
- if ($RCMAIL->config->get('top_posting'))
+ if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting
$prefix = "\n\n\n" . $prefix;
+ }
}
else {
// save inline images to files
@@ -921,7 +922,7 @@ function rcmail_create_reply_body($body, $bodyIsHtml)
$prefix = '<p>' . Q($prefix) . "</p>\n";
$prefix .= '<blockquote>';
- if ($RCMAIL->config->get('top_posting')) {
+ if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting
$prefix = '<br>' . $prefix;
$suffix = '</blockquote>';
}