2010-02-22 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_alerts.php: fix when try delete only the alerts from
	alert policies form. 



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2397 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-02-22 17:01:58 +00:00
parent 4939bbb0cf
commit ec84e1c7a3
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2010-02-22 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_alerts.php: fix when try delete only the alerts from
alert policies form.
2010-02-22 Miguel de Dios <miguel.dedios@artica.es>
* images/groups_small/*.ok.png, images/groups_small/*.default.png,

View File

@ -410,13 +410,15 @@ function delete_alert_agent_module ($id_alert_agent_module, $filter = false) {
if ($id_alert_agent_module)
$filter['id'] = $id_alert_agent_module;
$idAlertCompunds = get_db_all_rows_sql('SELECT id_alert_compound
FROM talert_compound_elements
WHERE id_alert_template_module = ' . $id_alert_agent_module);
if ($idAlertCompunds !== false) {
foreach($idAlertCompunds as $id)
delete_alert_compound($id);
if ($id_alert_agent_module !== false) {
$idAlertCompunds = get_db_all_rows_sql('SELECT id_alert_compound
FROM talert_compound_elements
WHERE id_alert_template_module = ' . $id_alert_agent_module);
if ($idAlertCompunds !== false) {
foreach($idAlertCompunds as $id)
delete_alert_compound($id);
}
}
return (@process_sql_delete ('talert_template_modules',