From 77fc5899746761ff154a9ffae81d86d65da84544 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 5 Feb 2019 08:56:25 +0100 Subject: [PATCH] Fix regression where operator/comparator were not reset on submit (#6614) --- plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index 687d8773f..fb7c5aa79 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -3031,7 +3031,7 @@ class rcube_sieve_engine { // matching type select (operator) $select_op = new html_select(array( - 'name' => "_{$name}[]", + 'name' => "_{$name}[$id]", 'id' => "{$name}{$id}", 'style' => 'display:' .(!in_array($rule, array('size', 'duplicate')) ? 'inline' : 'none'), 'class' => 'operator_selector', @@ -3072,7 +3072,7 @@ class rcube_sieve_engine protected function comparator_selector($comparator, $name, $id) { - $select_comp = new html_select(array('name' => "_{$name}[]", 'id' => "{$name}_op{$id}")); + $select_comp = new html_select(array('name' => "_{$name}[$id]", 'id' => "{$name}_op{$id}")); $select_comp->add(rcube::Q($this->plugin->gettext('default')), ''); $select_comp->add(rcube::Q($this->plugin->gettext('octet')), 'i;octet'); $select_comp->add(rcube::Q($this->plugin->gettext('asciicasemap')), 'i;ascii-casemap');