From 83d8b5348f458ed42407a417cdd4150a45b39a19 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 8 Feb 2022 17:54:14 +0100 Subject: [PATCH] pol group api create agent auto-assign fix --- pandora_console/include/functions_api.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 3780b4141b..2b7e045844 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1535,10 +1535,6 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) 'disabled', ] ); - $tpolicy_group_old = db_get_all_rows_sql( - 'SELECT id_policy FROM tpolicy_groups - WHERE id_group = '.$values_old['id_grupo'] - ); $return = db_process_sql_update( 'tagente', @@ -1955,23 +1951,6 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) agents_add_address($id_agente, $direccion_agente); } - $tpolicy_group_old = db_get_all_rows_sql( - 'SELECT id_policy FROM tpolicy_groups - WHERE id_group = '.$grupo - ); - - if ($tpolicy_group_old) { - foreach ($tpolicy_group_old as $key => $old_group) { - db_process_sql_insert( - 'tpolicy_agents', - [ - 'id_policy' => $old_group['id_policy'], - 'id_agent' => $id_agente, - ] - ); - } - } - $info = '{"Name":"'.$nombre_agente.'", "IP":"'.$direccion_agente.'", "Group":"'.$grupo.'",