summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-01-22 10:19:51 +0100
committerAleksander Machniak <alec@alec.pl>2015-01-22 10:19:51 +0100
commit5d42a9353b3df5e08b7dfc2ac6a92978a89cceca (patch)
treee830d774a547c1444ef52fbedc4c873a911286e0 /program/steps
parent5beaac231eba40093cfb330510e176d517ee00a4 (diff)
Fix bug where drafts list wasn't refreshed after draft message was sent from another window (#1490238)
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/compose.inc7
-rw-r--r--program/steps/mail/sendmail.inc2
2 files changed, 5 insertions, 4 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 1731a4822..db4efc7ce 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -53,13 +53,14 @@ if (!is_array($COMPOSE)) {
}
$COMPOSE_ID = uniqid(mt_rand());
+ $params = rcube_utils::request2param(rcube_utils::INPUT_GET, 'task|action', true);
+
$_SESSION['compose_data_'.$COMPOSE_ID] = array(
'id' => $COMPOSE_ID,
- 'param' => rcube_utils::request2param(rcube_utils::INPUT_GET, 'task|action', true),
- 'mailbox' => $RCMAIL->storage->get_folder(),
+ 'param' => $params,
+ 'mailbox' => $params['mbox'] ?: $RCMAIL->storage->get_folder(),
);
$COMPOSE =& $_SESSION['compose_data_'.$COMPOSE_ID];
-
rcmail_process_compose_params($COMPOSE);
// check if folder for saving sent messages exists and is subscribed (#1486802)
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 4ad43e433..76a8188c3 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -686,7 +686,7 @@ if ($savedraft) {
else {
$folders = array();
- if ($COMPOSE['mode'] == 'reply' || $COMPOSE['mode'] == 'forward') {
+ if (in_array($COMPOSE['mode'], array('reply', 'forward', 'draft'))) {
$folders[] = $COMPOSE['mailbox'];
}