summaryrefslogtreecommitdiff
path: root/classes/pref
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-31 13:00:23 +0400
committerAndrew Dolgov <[email protected]>2012-08-31 13:00:23 +0400
commite8b703878decaf05d4d93954c2632c0d3bc338d9 (patch)
tree2530ecee2f5c2a89b8e5b8c936326007a67806a4 /classes/pref
parent37f78940d8492a657c2ab8a7b1a3a3079abb3b70 (diff)
fix preffiltertree layout being wrong
Diffstat (limited to 'classes/pref')
-rw-r--r--classes/pref/filters.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/classes/pref/filters.php b/classes/pref/filters.php
index 04077e52f..1645639ed 100644
--- a/classes/pref/filters.php
+++ b/classes/pref/filters.php
@@ -125,12 +125,12 @@ class Pref_Filters extends Handler_Protected {
if ($action_id != $line["action_id"]) {
if (count($folder['items']) > 0) {
- $folder['id'] = $line["action_id"];
- $folder['name'] = $line["action_name"];
-
array_push($root['items'], $folder);
}
+
$folder = array();
+ $folder['id'] = $line["action_id"];
+ $folder['name'] = $line["action_name"];
$folder['items'] = array();
$action_id = $line["action_id"];
}
@@ -148,6 +148,10 @@ class Pref_Filters extends Handler_Protected {
array_push($folder['items'], $filter);
}
+ if (count($folder['items']) > 0) {
+ array_push($root['items'], $folder);
+ }
+
$fl = array();
$fl['identifier'] = 'id';
$fl['label'] = 'name';