From fcc34c0cace7c35c4ad82911f1c7c09f40939dfb Mon Sep 17 00:00:00 2001 From: alecpl Date: Sun, 20 Sep 2009 06:33:47 +0000 Subject: - Fix first rule deleting (#1486140) --- plugins/managesieve/Changelog | 5 ++++- plugins/managesieve/lib/rcube_sieve.php | 6 ++++-- plugins/managesieve/managesieve.php | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index dd144b2f6..d5abbb2c1 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,5 +1,8 @@ +* version 1.7 [2009-09-20] +----------------------------------------------------------- - Support multiple managesieve hosts using %h variable - in managesieve_host option + in managesieve_host option +- Fix first rule deleting (#1486140) * version 1.6 [2009-09-08] ----------------------------------------------------------- diff --git a/plugins/managesieve/lib/rcube_sieve.php b/plugins/managesieve/lib/rcube_sieve.php index 2ab30c54d..2490aca6e 100644 --- a/plugins/managesieve/lib/rcube_sieve.php +++ b/plugins/managesieve/lib/rcube_sieve.php @@ -264,9 +264,10 @@ class rcube_sieve_script { $script = ''; $exts = array(); + $idx = 0; // rules - foreach ($this->content as $idx => $rule) + foreach ($this->content as $rule) { $extension = ''; $tests = array(); @@ -367,7 +368,8 @@ class rcube_sieve_script } $script .= "}\n"; - + $idx++; + if ($extension && !isset($exts[$extension])) $exts[$extension] = $extension; } diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index df1be8fe2..9a5e721c1 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -7,7 +7,7 @@ * It's clickable interface which operates on text scripts and communicates * with server using managesieve protocol. Adds Filters tab in Settings. * - * @version 1.6 + * @version 1.7 * @author Aleksander 'A.L.E.C' Machniak * * Configuration (see config.inc.php.dist): -- cgit v1.2.3