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 9690328 commit ea41ae4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

- Managesieve: Fix match-type selector (remove unsupported options) in delete header action (#9610)

## Release 1.6.10

- IMAP: Partial support for ANNOTATE-EXPERIMENT-1 extension (RFC 5257)
- OAuth: Support standard authentication with short-living password received with OIDC token (#9530)
- Fix PHP warnings (#9616, #9611)
Expand Down
1 change: 1 addition & 0 deletions plugins/managesieve/Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,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.4 [2021-06-06]
-----------------------------------------------------------
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 @@ -3334,18 +3334,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 ea41ae4

Please sign in to comment.