From 78ef00f12def4d76cec708a5e436d83c75ee3c91 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 22 Nov 2013 03:21:36 -0500
Subject: [PATCH] Fix a bug where deleted filter was not removed from the list (because now list widget's 'rows' property is of type object not array)

---
 plugins/managesieve/Changelog      |    1 +
 plugins/managesieve/managesieve.js |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index 115aec1..cd8daf1 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -3,6 +3,7 @@
 - Fix bug where at least one additional address of vacation message was required (#1489345)
 - Fix so i;ascii-numeric comparator is not forced as default for :count and :value operators
 - Fix date/currentdate related form issues and comparators handling (#1489346)
+- Fix a bug where deleted filter was not removed from the list
 
 * version 7.0 [2013-09-09]
 -----------------------------------------------------------
diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js
index fa13b71..22a50ba 100644
--- a/plugins/managesieve/managesieve.js
+++ b/plugins/managesieve/managesieve.js
@@ -161,7 +161,7 @@
 {
   var i, rows = this.filters_list.rows;
 
-  for (i=0; i<rows.length; i++)
+  for (i in rows)
     if (rows[i] != null && rows[i].uid == id)
       return i;
 };

--
Gitblit v1.9.1