diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-09 10:17:31 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-09 10:17:31 +0000 |
| commit | c34be76e2d0e75e5574f86078a656d6658addb58 (patch) | |
| tree | 40985068ee87691607466a3dd1f7333c2be25751 /roundcubemail | |
| parent | 30f464ff27bda43fa08734fdfcf767407e2c78d9 (diff) | |
- Fix matching case sensitivity when setting identity on reply (#1485480)
- Prefer default identity on reply
git-svn-id: https://svn.roundcube.net/trunk@1965 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/CHANGELOG | 4 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/compose.inc | 21 |
2 files changed, 15 insertions, 10 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 4a0e8a570..58a508893 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -3,7 +3,9 @@ CHANGELOG RoundCube Webmail 2008/10/09 (alec) ---------- -- fixed iil_C_Sort() to support very long and/or divided responses (#1485283) +- Fix iil_C_Sort() to support very long and/or divided responses (#1485283) +- Fix matching case sensitivity when setting identity on reply (#1485480) +- Prefer default identity on reply 2008/10/08 (alec) ---------- diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc index 517c0e1b7..d6656ea24 100644 --- a/roundcubemail/program/steps/mail/compose.inc +++ b/roundcubemail/program/steps/mail/compose.inc @@ -283,7 +283,7 @@ function rcmail_compose_header_from($attrib) foreach ($a_to as $addr) { if (!empty($addr['mailto'])) - $a_recipients[] = $addr['mailto']; + $a_recipients[] = rc_strtolower($addr['mailto']); } if (!empty($MESSAGE->headers->cc)) @@ -292,7 +292,7 @@ function rcmail_compose_header_from($attrib) foreach ($a_cc as $addr) { if (!empty($addr['mailto'])) - $a_recipients[] = $addr['mailto']; + $a_recipients[] = rc_strtolower($addr['mailto']); } } } @@ -326,19 +326,22 @@ function rcmail_compose_header_from($attrib) } } - // set identity if it's one of the reply-message recipients - if (in_array($sql_arr['email'], $a_recipients)) - $from_id = $sql_arr['identity_id']; - if ($compose_mode == RCUBE_COMPOSE_REPLY && is_array($MESSAGE->compose_from)) $MESSAGE->compose_from[] = $sql_arr['email']; - if ($compose_mode == RCUBE_COMPOSE_DRAFT && strstr($MESSAGE->headers->from, $sql_arr['email'])) - $from_id = $sql_arr['identity_id']; + if (empty($_POST['_from'])) + { + // set draft's identity + if ($compose_mode == RCUBE_COMPOSE_DRAFT && strstr($MESSAGE->headers->from, $sql_arr['email'])) + $from_id = $sql_arr['identity_id']; + // set identity if it's one of the reply-message recipients (with prio for default identity) + else if (in_array(rc_strtolower($sql_arr['email']), $a_recipients) && (empty($from_id) || $sql_arr['standard'])) + $from_id = $sql_arr['identity_id']; + } } // overwrite identity selection with post parameter - if (isset($_POST['_from'])) + if (!empty($_POST['_from'])) $from_id = get_input_value('_from', RCUBE_INPUT_POST); $out = $select_from->show($from_id); |
