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"];
}
array_push($folder['items'], $filter);
}
+ if (count($folder['items']) > 0) {
+ array_push($root['items'], $folder);
+ }
+
$fl = array();
$fl['identifier'] = 'id';
$fl['label'] = 'name';