From f77473bf04dc3e6a47690518326be4553d22a930 Mon Sep 17 00:00:00 2001 From: Baraka Kinywa Date: Wed, 29 May 2024 00:47:40 +0200 Subject: [PATCH] [FIX]output_modules.php(message_headers): Show Snooze and Block Sender options for non draft message only --- modules/imap/output_modules.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/imap/output_modules.php b/modules/imap/output_modules.php index 9a5cd64ea4..61c18b2b2f 100644 --- a/modules/imap/output_modules.php +++ b/modules/imap/output_modules.php @@ -370,10 +370,10 @@ protected function output() { $txt .= ' | '.$this->trans('Copy').''; $txt .= ' | '.$this->trans('Move').''; $txt .= ' | '.$this->trans('Archive').''; - $txt .= ' | ' . snooze_dropdown($this, isset($headers['X-Snoozed'])); - $txt .= ' | ' . $this->trans('Show Source') . ''; - if ($this->get('sieve_filters_enabled')) { + $is_draft = isset($headers['Flags']) && stristr($headers['Flags'], 'draft'); + if ($this->get('sieve_filters_enabled') && !$is_draft) { + $txt .= ' | ' . snooze_dropdown($this, isset($headers['X-Snoozed'])); $server_id = $this->get('msg_server_id'); $imap_server = $this->get('imap_accounts')[$server_id]; if ($this->get('sieve_filters_client')) { @@ -393,8 +393,9 @@ protected function output() { $txt .= ' | '.$this->trans('Block Sender').''; } } + $txt .= ' | ' . $this->trans('Show Source') . ''; - if (isset($headers['Flags']) && stristr($headers['Flags'], 'draft')) { + if ($is_draft) { $txt .= ' | '.$this->trans('Edit Draft').''; } $txt .= '
';