diff --git a/pandora_console/godmode/groups/configure_group.php b/pandora_console/godmode/groups/configure_group.php index 7b9b43ed41..08e2c2e9f3 100644 --- a/pandora_console/godmode/groups/configure_group.php +++ b/pandora_console/godmode/groups/configure_group.php @@ -149,12 +149,12 @@ if ($id_group) { $table->data[2][1] .= html_print_select_groups( false, 'AR', - true, + false, 'id_parent', $id_parent, '', - '', - '', + __('None'), + -1, true, false, true, @@ -174,7 +174,9 @@ if ($id_group) { 'name' => 'id_parent', 'selected' => $id_parent, 'return' => true, - 'returnAllGroup' => true, + 'returnAllGroup' => false, + 'nothing' => __('None'), + 'nothing_value' => -1, ] ); $table->data[2][1] .= ''; @@ -182,7 +184,7 @@ if ($id_group) { if ($acl_parent) { $table->data[2][1] .= ' '; - $table->data[2][1] .= html_print_image('images/groups_small/'.groups_get_icon($id_parent).'.png', true); + $table->data[2][1] .= html_print_image('images/groups_small/'.( $id_parent != 0 ? groups_get_icon($id_parent) : 'without_group').'.png', true); $table->data[2][1] .= ''; } diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index 137796cd6e..74ea0af8fe 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -59,11 +59,11 @@ if (is_ajax() === true) { if ($get_group_json === true) { $id_group = (int) get_parameter('id_group'); - if ($id_group === 0) { + if ($id_group === 0 || $id_group === -1) { $group = [ 'id_grupo' => 0, - 'nombre' => 'All', - 'icon' => 'world', + 'nombre' => 'None', + 'icon' => '', 'parent' => 0, 'disabled' => 0, 'custom_id' => null, @@ -472,7 +472,7 @@ if ($update_group) { $values = [ 'nombre' => $name, 'icon' => empty($icon) ? '' : substr($icon, 0, -4), - 'parent' => $id_parent, + 'parent' => $id_parent == -1 ? 0 : $id_parent, 'disabled' => !$alerts_enabled, 'custom_id' => $custom_id, 'id_skin' => $skin, @@ -719,7 +719,7 @@ if ($tab == 'tree') { if (users_can_manage_group_all('AR') === false) { $user_groups_acl = users_get_groups(false, 'AR'); - $groups_acl = implode(',', $user_groups_ACL); + $groups_acl = implode('","', $user_groups_acl); if (empty($groups_acl) === true) { return ui_print_info_message( [ @@ -729,7 +729,7 @@ if ($tab == 'tree') { ); } - $acl = 'AND t.id_grupo IN ('.$groups_acl.')'; + $acl = 'AND t.nombre IN ("'.$groups_acl.'")'; } $form = "