From cd4e5057fcc2bbbd0ff75994bcd40b4f1228d079 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 30 Oct 2014 19:27:34 +0100 Subject: Don't trust get_folder(), use $MESSAGE->folder if available --- program/steps/mail/show.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'program/steps') diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index d4121fdd8..d3edde277 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -275,14 +275,13 @@ function rcmail_remote_objects_msg() function rcmail_message_buttons() { - global $RCMAIL; + global $RCMAIL, $MESSAGE; - $mbox = $RCMAIL->storage->get_folder(); $delim = $RCMAIL->storage->get_hierarchy_delimiter(); $dbox = $RCMAIL->config->get('drafts_mbox'); // the message is not a draft - if ($mbox != $dbox && strpos($mbox, $dbox.$delim) !== 0) { + if ($MESSAGE->folder != $dbox && strpos($MESSAGE->folder, $dbox.$delim) !== 0) { return ''; } -- cgit v1.2.3