mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-05 15:54:03 +01:00
Don't trust get_folder(), use $MESSAGE->folder if available
This commit is contained in:
@@ -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 '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user