| | |
| | | // 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 |
| | |
| | | $useHtml = $MESSAGE->has_html_part(false); |
| | | } |
| | | else if ($compose_mode == RCUBE_COMPOSE_REPLY) { |
| | | $useHtml = ($html_editor == 1 || ($html_editor == 2 && $MESSAGE->has_html_part(false))); |
| | | $useHtml = ($html_editor == 1 || ($html_editor >= 2 && $MESSAGE->has_html_part(false))); |
| | | } |
| | | else { // RCUBE_COMPOSE_FORWARD or NEW |
| | | else if ($compose_mode == RCUBE_COMPOSE_FORWARD) { |
| | | $useHtml = ($html_editor == 1 || ($html_editor == 3 && $MESSAGE->has_html_part(false))); |
| | | } |
| | | else { |
| | | $useHtml = ($html_editor == 1); |
| | | } |
| | | |
| | |
| | | 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)) { |
| | |
| | | $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 |
| | |
| | | $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>'; |
| | | } |