summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/compose.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-11 22:44:43 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-11 22:44:43 +0000
commitea2192a716fd087f969d01ba1a413756f41ce971 (patch)
treec4e3c2c0d6fec33b0ea654850b571a4a2913e003 /roundcubemail/program/steps/mail/compose.inc
parent0916627239b62a93313be11c4355803038f9deec (diff)
Save draft information in one header; finally fixes #1486203
git-svn-id: https://svn.roundcube.net/trunk@3353 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/compose.inc')
-rw-r--r--roundcubemail/program/steps/mail/compose.inc19
1 files changed, 14 insertions, 5 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc
index 36a352955..a5b0a340e 100644
--- a/roundcubemail/program/steps/mail/compose.inc
+++ b/roundcubemail/program/steps/mail/compose.inc
@@ -151,18 +151,27 @@ if (!empty($msg_uid))
if (!empty($_SESSION['compose']['param']['all']))
$MESSAGE->reply_all = 1;
-
+
$OUTPUT->set_env('compose_mode', 'reply');
}
else if ($compose_mode == RCUBE_COMPOSE_DRAFT)
{
- if($MESSAGE->headers->in_reply_to)
+ if ($MESSAGE->headers->others['x-draft-info'])
{
// get reply_uid/forward_uid to flag the original message when sending
- $_SESSION['compose']['reply_uid'] = $MESSAGE->headers->others['x-reply-uid'];
- $_SESSION['compose']['forward_uid'] = $MESSAGE->headers->others['x-forward-uid'];
- $_SESSION['compose']['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>';
+ $info = rcmail_draftinfo_decode($MESSAGE->headers->others['x-draft-info']);
+
+ if ($info['type'] == 'reply')
+ $_SESSION['compose']['reply_uid'] = $info['uid'];
+ else if ($info['type'] == 'forward')
+ $_SESSION['compose']['forward_uid'] = $info['uid'];
+
+ $_SESSION['compose']['mailbox'] = $info['folder'];
}
+
+ if ($MESSAGE->headers->in_reply_to)
+ $_SESSION['compose']['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>';
+
$_SESSION['compose']['references'] = $MESSAGE->headers->references;
}
else if ($compose_mode == RCUBE_COMPOSE_FORWARD)