summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-03-23 10:01:32 +0000
committeralecpl <alec@alec.pl>2010-03-23 10:01:32 +0000
commit416bff5475de17076a453417b9fa4174d506709a (patch)
tree344f606b27c2f2dfe1cc8b0d189ad7d2dcb168b1
parent9e8d8587d3377b7856a98b9a58fc3b77842c7f27 (diff)
- Allow to override identity when composing a message (#1486466)
-rw-r--r--program/steps/mail/compose.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 3c489ef23..d886801a3 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -377,7 +377,7 @@ function rcmail_compose_header_from($attrib)
if ($compose_mode == RCUBE_COMPOSE_REPLY && is_array($MESSAGE->compose_from))
$MESSAGE->compose_from[] = $sql_arr['email'];
- if (empty($_POST['_from']))
+ if (empty($_POST['_from']) && empty($_SESSION['compose']['param']['from']))
{
// set draft's identity
if ($compose_mode == RCUBE_COMPOSE_DRAFT && strstr($MESSAGE->headers->from, $sql_arr['email']))
@@ -391,6 +391,8 @@ function rcmail_compose_header_from($attrib)
// overwrite identity selection with post parameter
if (!empty($_POST['_from']))
$from_id = get_input_value('_from', RCUBE_INPUT_POST);
+ else if (!empty($_SESSION['compose']['param']['from']))
+ $from_id = $_SESSION['compose']['param']['from'];
$out = $select_from->show($from_id);