From 9ae34fae404fa1bc7c324448cd67fc275cd92020 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Thu, 31 Aug 2023 12:35:32 +0200 Subject: [PATCH] #11954 Fix delete alerts action in bulk --- .../godmode/massive/massive_delete_action_alerts.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/massive/massive_delete_action_alerts.php b/pandora_console/godmode/massive/massive_delete_action_alerts.php index cad37a3a29..0cd712e124 100644 --- a/pandora_console/godmode/massive/massive_delete_action_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_action_alerts.php @@ -111,7 +111,8 @@ if ($delete) { $alerts_agent_modules = []; foreach ($agent_alerts['simple'] as $agent_alert) { if ((in_array($agent_alert['id_alert_template'], $id_alert_templates)) && (in_array($agent_alert['id_agent_module'], $modules_id))) { - $alerts_agent_modules = array_merge($alerts_agent_modules, alerts_get_alerts_agent_module($agent_alert['id_agent_module'], true, false, 'id')); + // $alerts_agent_modules = array_merge($alerts_agent_modules, alerts_get_alerts_agent_module($agent_alert['id_agent_module'], true, false, 'id')); + $alerts_agent_modules[] = $agent_alert['id']; } } @@ -126,7 +127,7 @@ if ($delete) { $agent_module_actions = []; foreach ($alerts_agent_modules as $alert_agent_module) { - $agent_module_actions = alerts_get_alert_agent_module_actions($alert_agent_module['id'], ['id', 'id_alert_action']); + $agent_module_actions = alerts_get_alert_agent_module_actions($alert_agent_module, ['id', 'id_alert_action']); foreach ($agent_module_actions as $agent_module_action) { foreach ($actions as $action) {