summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-09-20 06:33:47 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-09-20 06:33:47 +0000
commit4578edf57198baa6f29cc4651507f7e66cd35281 (patch)
treeb041bd3c424744e49300dcc55eae74243957d889
parentac9555efac0891c439bde4f49f1bf2314ec48d53 (diff)
- Fix first rule deleting (#1486140)
git-svn-id: https://svn.roundcube.net/trunk@2970 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/plugins/managesieve/Changelog5
-rw-r--r--roundcubemail/plugins/managesieve/lib/rcube_sieve.php6
-rw-r--r--roundcubemail/plugins/managesieve/managesieve.php2
3 files changed, 9 insertions, 4 deletions
diff --git a/roundcubemail/plugins/managesieve/Changelog b/roundcubemail/plugins/managesieve/Changelog
index dd144b2f6..d5abbb2c1 100644
--- a/roundcubemail/plugins/managesieve/Changelog
+++ b/roundcubemail/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/roundcubemail/plugins/managesieve/lib/rcube_sieve.php b/roundcubemail/plugins/managesieve/lib/rcube_sieve.php
index 2ab30c54d..2490aca6e 100644
--- a/roundcubemail/plugins/managesieve/lib/rcube_sieve.php
+++ b/roundcubemail/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/roundcubemail/plugins/managesieve/managesieve.php b/roundcubemail/plugins/managesieve/managesieve.php
index df1be8fe2..9a5e721c1 100644
--- a/roundcubemail/plugins/managesieve/managesieve.php
+++ b/roundcubemail/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):