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

This commit is contained in:
Aleksander Machniak
2025-02-16 13:23:22 +01:00
parent 44f0ac5b00
commit 1c8f6048a3
3 changed files with 13 additions and 5 deletions

View File

@@ -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]
-----------------------------------------------------------

View File

@@ -3259,18 +3259,24 @@ class rcube_sieve_engine
]);
$select_op->add(rcube::Q($this->plugin->gettext('filtercontains')), 'contains');
$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('filternotcontains')), 'notcontains');
}
$select_op->add(rcube::Q($this->plugin->gettext('filteris')), 'is');
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');