| | |
| | | } |
| | | // 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', intval($RCMAIL->config->get('reply_mode')) > 0); |
| | | $OUTPUT->set_env('recipients_separator', trim($RCMAIL->config->get('recipients_separator', ','))); |
| | | |
| | |
| | | } |
| | | } |
| | | else if ($compose_mode == RCUBE_COMPOSE_DRAFT) { |
| | | if ($MESSAGE->headers->others['x-draft-info']) { |
| | | if ($draft_info = $MESSAGE->headers->get('x-draft-info')) { |
| | | // get reply_uid/forward_uid to flag the original message when sending |
| | | $info = rcmail_draftinfo_decode($MESSAGE->headers->others['x-draft-info']); |
| | | $info = rcmail_draftinfo_decode($draft_info); |
| | | |
| | | if ($info['type'] == 'reply') |
| | | $COMPOSE['reply_uid'] = $info['uid']; |
| | |
| | | } |
| | | } |
| | | |
| | | if ($MESSAGE->headers->in_reply_to) |
| | | $COMPOSE['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>'; |
| | | if ($in_reply_to = $MESSAGE->headers->get('in-reply-to')) |
| | | $COMPOSE['reply_msgid'] = '<' . $in_reply_to . '>'; |
| | | |
| | | $COMPOSE['references'] = $MESSAGE->headers->references; |
| | | } |
| | |
| | | if (count($MESSAGE->identities)) |
| | | { |
| | | $a_signatures = array(); |
| | | $separator = $RCMAIL->config->get('sig_above') |
| | | $separator = intval($RCMAIL->config->get('reply_mode')) > 0 |
| | | && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD) ? '---' : '-- '; |
| | | |
| | | $field_attrib['onchange'] = JS_OBJECT_NAME.".change_identity(this)"; |
| | |
| | | rcmail_write_forward_attachments(); |
| | | } |
| | | // reply/edit/draft/forward |
| | | else if ($compose_mode && ($compose_mode != RCUBE_COMPOSE_REPLY || $RCMAIL->config->get('reply_mode') != -1)) { |
| | | else if ($compose_mode && ($compose_mode != RCUBE_COMPOSE_REPLY || intval($RCMAIL->config->get('reply_mode')) != -1)) { |
| | | $isHtml = rcmail_compose_editor_mode(); |
| | | |
| | | if (!empty($MESSAGE->parts)) { |
| | |
| | | foreach ((array)$message->mime_parts as $pid => $part) |
| | | { |
| | | if ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename) { |
| | | if (($part->ctype_primary == 'message' && $bodyIsHtml) || $part->ctype_primary == 'multipart') { |
| | | // skip parts that aren't valid attachments |
| | | if ($part->ctype_primary == 'multipart' || $part->mimetype == 'application/ms-tnef') { |
| | | continue; |
| | | } |
| | | if ($part->mimetype == 'application/ms-tnef') { |
| | | // skip message attachments in reply mode |
| | | if ($part->ctype_primary == 'message' && $compose_mode == RCUBE_COMPOSE_REPLY) { |
| | | continue; |
| | | } |
| | | // skip inline images when forwarding in plain text |