From 2953bab0df23009d438d9d5a54abf8a899bea186 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 24 May 2022 09:55:37 +0200 Subject: [PATCH] #8999 Optimised delete agents in bulk --- .../godmode/massive/massive_delete_agents.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/massive/massive_delete_agents.php b/pandora_console/godmode/massive/massive_delete_agents.php index e85a12486d..cc87efebed 100755 --- a/pandora_console/godmode/massive/massive_delete_agents.php +++ b/pandora_console/godmode/massive/massive_delete_agents.php @@ -140,7 +140,7 @@ function process_manage_delete($id_agents) } -$id_group = (int) get_parameter('id_group'); +$id_group = (is_metaconsole() === true) ? get_parameter('id_group', '') : (int) get_parameter('id_group'); $id_agents = get_parameter('id_agents'); $recursion = get_parameter('recursion'); $delete = (bool) get_parameter_post('delete'); @@ -282,15 +282,15 @@ $table->data[3][0] .= ''; -$agents = agents_get_group_agents( - array_keys(users_get_groups($config['id_user'], 'AW', false)), - ['disabled' => 2], - 'none', - false, - false, - is_metaconsole(), - '|' -); +$agents = []; +if (is_metaconsole() === false) { + $agents = agents_get_group_agents( + array_keys(users_get_groups($config['id_user'], 'AW', false)), + ['disabled' => 2], + 'none' + ); +} + $table->data[3][1] = html_print_select( $agents,