From d698f88e770d58ba2689edd1771ff3f39d5fdfdc Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 21 Jan 2014 08:26:59 +0000 Subject: [PATCH] fix messages from draft and templates not opening in compose mode; fix typo that prevented the correct change of profile in getComposeFrom --- mail/inc/class.mail_compose.inc.php | 2 +- mail/inc/class.mail_ui.inc.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 92c5ec88c2..56bbbf0e1b 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -1293,7 +1293,7 @@ class mail_compose $icServerID = $hA['profileID']; if ($icServerID != $this->mail_bo->profileID) { - $this->changeProfile($_content['serverID']); + $this->changeProfile($icServerID); $composeProfile = $this->mail_bo->profileID; } $icServer = $this->mail_bo->icServer; diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 0c652aeadc..8c604420b5 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -1767,6 +1767,10 @@ unset($query['actions']); $uid = $hA['msgUID']; $mailbox = $hA['folder']; //error_log(__METHOD__.__LINE__.array2string($hA)); + if ($this->mail_bo->isDraftFolder($mailbox) || $this->mail_bo->isTemplateFolder($mailbox)) + { + egw::redirect_link('/index.php',array('menuaction'=>'mail.mail_compose.compose','id'=>$rowID,'from'=>'composefromdraft')); + } $this->mail_bo->reopen($mailbox); // retrieve the flags of the message, before touching it. $headers = $this->mail_bo->getMessageHeader($uid, $partID);