From dbc7e5b7c330f055176d253e53e58c67782cccd4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 19 Aug 2017 08:56:10 +0200 Subject: [PATCH] Fix bug where 'exists' operator was reset to 'contains' (#5899) --- CHANGELOG | 1 + plugins/managesieve/Changelog | 1 + plugins/managesieve/managesieve.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 6d6c43448..44cdbb423 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -40,6 +40,7 @@ CHANGELOG Roundcube Webmail - Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820) - Managesieve: Fix parsing dot-staffed lines in multiline text (#5838) - Managesieve: Fix AM/PM suffix in vacation time selectors +- Managesieve: Fix bug where 'exists' operator was reset to 'contains' (#5899) - Fix decoding non-ascii attachment names from TNEF attachments (#5646, #5799) - Fix uninitialized string offset in rcube_utils::bin2ascii() and make sure rcube_utils::random_bytes() result has always requested length (#5788) - Fix bug where HTML messages with @media styles could moddify style of page body (#5811) diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index 6cae23b3a..5a61f3d36 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,5 +1,6 @@ - Fix parsing dot-staffed lines in multiline text (#5838) - Fix AM/PM suffix in vacation time selectors +- Fix bug where 'exists' operator was reset to 'contains' (#5899) * version 8.9 [2017-05-22] ----------------------------------------------------------- diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js index d1f259b22..3eded8077 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -677,7 +677,7 @@ function rule_header_select(id) dateheader.style.display = h == 'date' ? '' : 'none'; $('[value="exists"],[value="notexists"]', rule).prop('disabled', h == 'string'); - if (!rule.val() || rule.val().match(/^(exists|notexists)$/)) + if (!rule.val()) rule.val('contains'); rule_op_select(op, id, h);