From e179475663be2c2ced681fd684ef409f895cfc85 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 30 Apr 2021 14:54:14 +0200 Subject: [PATCH] Repaired group selector in rules --- pandora_console/include/functions_groups.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 1a76ec059f..b15c6216a0 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -577,6 +577,14 @@ function groups_get_groups_tree_recursive($groups, $trash=0, $trash2=0) $group['parent'] = 0; } + if (is_array($tree[$group['parent']]) === false) { + $str = $tree[$group['parent']]; + $tree[$group['parent']] = [ + 'nombre' => $tree[$group['parent']], + 'id_grupo' => $group['parent'], + ]; + } + $tree[$group['parent']]['hash_branch'] = 1; $tree[$group['parent']]['branch'][$key] = &$tree[$key]; }