Show correct counter of deleted alerts - #5509
This commit is contained in:
parent
015b1b55b2
commit
13466536bd
|
@ -101,12 +101,19 @@ function process_manage_delete($id_alert_template, $id_agents, $module_names)
|
|||
|
||||
$module_selection_mode = get_parameter('modules_selection_mode');
|
||||
|
||||
$alert_list = db_get_all_rows_filter('talert_template_modules', ['id_alert_template' => $id_alert_template], 'id_agent_module');
|
||||
|
||||
foreach ($module_names as $module) {
|
||||
foreach ($id_agents as $id_agent) {
|
||||
$module_id = modules_get_agentmodule_id($module, $id_agent);
|
||||
// The module can exist in several of the selected agents, but we have to check if it has an alert.
|
||||
foreach ($alert_list as $alert) {
|
||||
if ($alert['id_agent_module'] == $module_id['id_agente_modulo']) {
|
||||
$modules_id[] = $module_id['id_agente_modulo'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If is selected "ANY" option then we need the module selection
|
||||
// mode: common or all modules
|
||||
|
|
Loading…
Reference in New Issue