From 3562d7ffa6895f0636a5f0760fabeeb63c87cb12 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 21 Apr 2019 08:34:56 +0200 Subject: [PATCH] Fix so "Create filter" option does not show up when Filters menu is disabled (#6723) --- CHANGELOG | 1 + plugins/managesieve/Changelog | 1 + plugins/managesieve/managesieve.php | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index b0a8a67ec..f75ac34a0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,7 @@ CHANGELOG Roundcube Webmail - Elastic: Fix non-working pretty selects in Chrome browser (#6705) - Managesieve: Fix bug where global includes were requested for vacation (#6716) - Managesieve: Use RFC-compliant line endings, CRLF instead of LF (#6686) +- Managesieve: Fix so "Create filter" option does not show up when Filters menu is disabled (#6723) - Fix bug in HTML parser that could cause missing text fragments when there was no head/body tag (#6713) - Fix bug where HTML messages with a xml:namespace tag were not rendered (#6697) - Fix TinyMCE download location (#6694) diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index d294888d9..8538f107f 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,5 +1,6 @@ - Use RFC-compliant line endings, CRLF instead of LF (#6686) - Fix bug where global includes were requested for vacation (#6716) +- Fix so "Create filter" option does not show up when Filters menu is disabled (#6723) * version 9.2 [2018-11-08] ----------------------------------------------------------- diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index e69f7c3da..9dfbe5dd4 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -156,6 +156,13 @@ class managesieve extends rcube_plugin return; } + $vacation_mode = (int) $this->rc->config->get('managesieve_vacation'); + $forward_mode = (int) $this->rc->config->get('managesieve_forward'); + + if ($vacation_mode == 2 || $forward_mode == 2) { + return; + } + // include js script and localization $this->init_ui();