summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-20 06:33:47 +0000
committeralecpl <alec@alec.pl>2009-09-20 06:33:47 +0000
commitfcc34c0cace7c35c4ad82911f1c7c09f40939dfb (patch)
treedd5cff6d252af13fc97115a8301ef8791de9d76b
parent0dd842dbf5a63af81fc2abfc884dd9889e59b269 (diff)
- Fix first rule deleting (#1486140)
-rw-r--r--plugins/managesieve/Changelog5
-rw-r--r--plugins/managesieve/lib/rcube_sieve.php6
-rw-r--r--plugins/managesieve/managesieve.php2
3 files changed, 9 insertions, 4 deletions
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 <alec@alec.pl>
*
* Configuration (see config.inc.php.dist):