From 181a480b9d7b3a696622b312596d91081cc0ca00 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Mon, 19 Sep 2022 10:44:25 +0200 Subject: [PATCH] fixed api methods for creating and deleting scheduled downtimes agents --- pandora_console/include/functions_api.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index d711432ef9..2eb053e83a 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -7685,8 +7685,7 @@ function api_set_planned_downtimes_delete_agents($id, $thrash1, $other, $thrash3 } if (!empty($other['data'][0])) { - $agents = io_safe_input($other['data']); - $agents = explode(';', $agents); + $agents = $other['data']; $results = false; foreach ($agents as $agent) { if (db_get_value_sql(sprintf('SELECT id from tplanned_downtime_agents WHERE id_agent = %d AND id_downtime = %d', $agent, $id)) !== false) { @@ -7762,8 +7761,7 @@ function api_set_planned_downtimes_add_agents($id, $thrash1, $other, $thrash3) } if (!empty($other['data'][0])) { - $agents = io_safe_input($other['data']); - $agents = explode(';', $agents); + $agents = $other['data']; $results = false; foreach ($agents as $agent) { if (db_get_value_sql(sprintf('SELECT id from tplanned_downtime_agents tpd WHERE tpd.id_agent = %d AND id_downtime = %d', $agent, $id)) === false) {