Skip to content

Commit

Permalink
Fix match-type selector (remove unsupported options) in delete header…
Browse files Browse the repository at this point in the history
… action (#9610)
  • Loading branch information
alecpl committed Feb 16, 2025
1 parent 44f0ac5 commit 1c8f604
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
- Fix attachment name decoding when 'charset' parameter exists in the headers (#9376)
- Fix deprecated (in PHP 8.4) use of session_set_save_handler() (#9060)
- Fix potential HTTP protocol version mismatch (#8982)
- Managesieve: Fix match-type selector (remove unsupported options) in delete header action (#9610)

## Release 1.6.10

Expand Down
1 change: 1 addition & 0 deletions plugins/managesieve/Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Protect special scripts in managesieve_kolab_master mode
- Fix infinite loop when parsing a malformed script (#9562)
- Fix current script state after initial scripts creation in managesieve_kolab_master mode
- Fix match-type selector (remove unsupported options) in delete header action (#9610)

* version 9.5 [2023-03-26]
-----------------------------------------------------------
Expand Down
14 changes: 10 additions & 4 deletions plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -3259,18 +3259,24 @@ protected function match_type_selector($name, $id, $test, $rule = null, $mode =
]);

$select_op->add(rcube::Q($this->plugin->gettext('filtercontains')), 'contains');
$select_op->add(rcube::Q($this->plugin->gettext('filternotcontains')), 'notcontains');
if ($mode == 'all') {
$select_op->add(rcube::Q($this->plugin->gettext('filternotcontains')), 'notcontains');
}
$select_op->add(rcube::Q($this->plugin->gettext('filteris')), 'is');
$select_op->add(rcube::Q($this->plugin->gettext('filterisnot')), 'notis');
if ($mode == 'all') {
$select_op->add(rcube::Q($this->plugin->gettext('filterisnot')), 'notis');
$select_op->add(rcube::Q($this->plugin->gettext('filterexists')), 'exists');
$select_op->add(rcube::Q($this->plugin->gettext('filternotexists')), 'notexists');
}
$select_op->add(rcube::Q($this->plugin->gettext('filtermatches')), 'matches');
$select_op->add(rcube::Q($this->plugin->gettext('filternotmatches')), 'notmatches');
if ($mode == 'all') {
$select_op->add(rcube::Q($this->plugin->gettext('filternotmatches')), 'notmatches');
}
if (in_array('regex', $this->exts)) {
$select_op->add(rcube::Q($this->plugin->gettext('filterregex')), 'regex');
$select_op->add(rcube::Q($this->plugin->gettext('filternotregex')), 'notregex');
if ($mode == 'all') {
$select_op->add(rcube::Q($this->plugin->gettext('filternotregex')), 'notregex');
}
}
if ($mode == 'all' && in_array('relational', $this->exts)) {
$select_op->add(rcube::Q($this->plugin->gettext('countisgreaterthan')), 'count-gt');
Expand Down

0 comments on commit 1c8f604

Please sign in to comment.