diff options
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/compose.inc | 17 | ||||
-rw-r--r-- | program/steps/mail/func.inc | 9 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 7 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 50 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 1 |
5 files changed, 51 insertions, 33 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 9ee57d31e..d3bc7fe72 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -327,7 +327,8 @@ foreach ($parts as $header) { $fvalue .= $v; if ($v = $MESSAGE->headers->cc) $fvalue .= (!empty($fvalue) ? $separator : '') . $v; - if ($v = $MESSAGE->headers->get('Sender', false)) + // Use Sender header (#1489011) + if (($v = $MESSAGE->headers->get('Sender', false)) && strpos($v, '-bounces@') === false) $fvalue .= (!empty($fvalue) ? $separator : '') . $v; // When To: and Reply-To: are the same we add From: address to the list (#1489037) @@ -474,6 +475,7 @@ function rcmail_compose_header_from($attrib) if (count($MESSAGE->identities)) { $a_signatures = array(); + $identities = array(); $separator = intval($RCMAIL->config->get('reply_mode')) > 0 && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD) ? '---' : '-- '; @@ -511,12 +513,21 @@ function rcmail_compose_header_from($attrib) $a_signatures[$identity_id]['text'] = $text; $a_signatures[$identity_id]['html'] = $html; } + + // add bcc and reply-to + if (!empty($sql_arr['reply-to'])) { + $identities[$identity_id]['replyto'] = $sql_arr['reply-to']; + } + if (!empty($sql_arr['bcc'])) { + $identities[$identity_id]['bcc'] = $sql_arr['bcc']; + } } $out = $select_from->show($MESSAGE->compose['from']); // add signatures to client $OUTPUT->set_env('signatures', $a_signatures); + $OUTPUT->set_env('identities', $identities); } // no identities, display text input field else { @@ -1022,8 +1033,8 @@ function rcmail_write_compose_attachments(&$message, $bodyIsHtml) if ($part->ctype_primary == 'message' && $compose_mode == RCUBE_COMPOSE_REPLY) { continue; } - // skip inline images when forwarding in plain text - if ($part->content_id && !$bodyIsHtml && $compose_mode == RCUBE_COMPOSE_FORWARD) { + // skip inline images when forwarding + if ($part->content_id && $part->disposition == 'inline' && $compose_mode == RCUBE_COMPOSE_FORWARD) { continue; } diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index ab4b41155..1a687f508 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1786,9 +1786,12 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r // Try Return-Path if ($from_idx === null && ($return_path = $MESSAGE->headers->others['return-path'])) { foreach ($identities as $idx => $ident) { - if (strpos($return_path, str_replace('@', '=', $ident['email_ascii']).'@') !== false) { - $from_idx = $idx; - break; + $ident = str_replace('@', '=', $ident['email_ascii']) . '@'; + foreach ((array)$return_path as $path) { + if (strpos($path, $ident) !== false) { + $from_idx = $idx; + break 2; + } } } } diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index cb3a40524..cf22a2af9 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -391,10 +391,6 @@ if (!empty($mailcc)) { if (!empty($mailbcc)) { $headers['Bcc'] = $mailbcc; } -if (!empty($identity_arr['bcc']) && stripos($headers['Bcc'], $identity_arr['bcc']) === false) { - $headers['Bcc'] = ($headers['Bcc'] ? $headers['Bcc'].', ' : '') . $identity_arr['bcc']; - $RECIPIENT_COUNT ++; -} if (($max_recipients = (int) $RCMAIL->config->get('max_recipients')) > 0) { if ($RECIPIENT_COUNT > $max_recipients) { @@ -412,9 +408,6 @@ if (!empty($identity_arr['organization'])) { if (!empty($_POST['_replyto'])) { $headers['Reply-To'] = rcmail_email_input_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset)); } -else if (!empty($identity_arr['reply-to'])) { - $headers['Reply-To'] = rcmail_email_input_format($identity_arr['reply-to'], false, true); -} if (!empty($headers['Reply-To'])) { $headers['Mail-Reply-To'] = $headers['Reply-To']; } diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 2cbfed16c..cbe3bc954 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -95,13 +95,13 @@ function get_form_tags($attrib, $action, $id = null, $hidden = null) if (empty($EDIT_FORM)) { $request_key = $action . (isset($id) ? '.'.$id : ''); $form_start = $RCMAIL->output->request_form(array( - 'name' => 'form', - 'method' => 'post', - 'task' => $RCMAIL->task, - 'action' => $action, - 'request' => $request_key, - 'noclose' => true - ) + $attrib); + 'name' => 'form', + 'method' => 'post', + 'task' => $RCMAIL->task, + 'action' => $action, + 'request' => $request_key, + 'noclose' => true + ) + $attrib); if (is_array($hidden)) { $hiddenfields = new html_hiddenfield($hidden); @@ -152,6 +152,8 @@ function rcmail_user_prefs($current=null) $blocks = array( 'main' => array('name' => Q(rcube_label('mainoptions'))), + 'skin' => array('name' => Q(rcube_label('skin'))), + 'browser' => array('name' => Q(rcube_label('browseroptions'))), ); // language selection @@ -263,8 +265,6 @@ function rcmail_user_prefs($current=null) $field_id = 'rcmfd_skin'; $input_skin = new html_radiobutton(array('name'=>'_skin')); - $blocks['skin'] = array('name' => Q(rcube_label('skin')),); - foreach($skins as $skin) { $thumbnail = "./skins/$skin/thumbnail.png"; if (!is_file($thumbnail)) @@ -290,17 +290,27 @@ function rcmail_user_prefs($current=null) } } + // standard_windows option decides if new windows should be + // opened as popups or standard windows (which can be handled by browsers as tabs) + if (!isset($no_override['standard_windows'])) { + $field_id = 'rcmfd_standard_windows'; + $checkbox = new html_checkbox(array('name' => '_standard_windows', 'id' => $field_id, 'value' => 1)); + + $blocks['browser']['options']['standard_windows'] = array( + 'title' => html::label($field_id, Q(rcube_label('standardwindows'))), + 'content' => $checkbox->show($config['standard_windows']?1:0), + ); + } + + $product_name = $RCMAIL->config->get('product_name', 'Roundcube Webmail'); $RCMAIL->output->add_script(sprintf("%s.check_protocol_handler('%s', '#mailtoprotohandler');", JS_OBJECT_NAME, JQ($product_name)), 'foot'); - $blocks['browser'] = array( - 'name' => Q(rcube_label('browseroptions')), - 'options' => array('mailtoprotohandler' => array( - 'content' => html::a(array( - 'href' => '#', - 'id' => 'mailtoprotohandler'), Q(rcube_label('mailtoprotohandler'))), - )), + $blocks['browser']['options']['mailtoprotohandler'] = array( + 'content' => html::a(array( + 'href' => '#', + 'id' => 'mailtoprotohandler'), Q(rcube_label('mailtoprotohandler'))), ); break; @@ -810,13 +820,13 @@ function rcmail_user_prefs($current=null) $blocks['main']['options']['sent_mbox'] = array( 'title' => Q(rcube_label('sent')), 'content' => $select->show($config['sent_mbox'], array('name' => "_sent_mbox")), - ); + ); if (!isset($no_override['junk_mbox'])) $blocks['main']['options']['junk_mbox'] = array( 'title' => Q(rcube_label('junk')), 'content' => $select->show($config['junk_mbox'], array('name' => "_junk_mbox")), - ); + ); if (!isset($no_override['trash_mbox'])) $blocks['main']['options']['trash_mbox'] = array( @@ -918,7 +928,7 @@ function rcmail_user_prefs($current=null) foreach ($data['blocks'] as $block) { if (!empty($block['content']) || !empty($block['options'])) { $found = true; - break; + break; } } @@ -940,7 +950,7 @@ function rcmail_get_skins() $dir = opendir($path); if (!$dir) - return false; + return false; while (($file = readdir($dir)) !== false) { diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index caaf6466c..19edb41d4 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -34,6 +34,7 @@ switch ($CURR_SECTION) 'time_format' => isset($_POST['_time_format']) ? get_input_value('_time_format', RCUBE_INPUT_POST) : ($CONFIG['time_format'] ? $CONFIG['time_format'] : 'H:i'), 'prettydate' => isset($_POST['_pretty_date']) ? TRUE : FALSE, 'refresh_interval' => isset($_POST['_refresh_interval']) ? intval($_POST['_refresh_interval'])*60 : $CONFIG['refresh_interval'], + 'standard_windows' => isset($_POST['_standard_windows']) ? TRUE : FALSE, 'skin' => isset($_POST['_skin']) ? get_input_value('_skin', RCUBE_INPUT_POST) : $CONFIG['skin'], ); |