From 6b37d757ac4961f7de0148d2cce977527921bfbf Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 25 Jun 2012 15:20:23 +0000 Subject: [PATCH] 2012-06-25 Juan Manuel Ramon * lib/PandoraFMS/Core.pm: Added deletion of tags when a module is being deleted. Merged from branches. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6700 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 7 +++++++ pandora_server/lib/PandoraFMS/Core.pm | 3 +++ 2 files changed, 10 insertions(+) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index be263e2025..cbc804b799 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,10 @@ +2012-06-25 Juan Manuel Ramon + + * lib/PandoraFMS/Core.pm: Added deletion of tags when a module is + being deleted. + + Merged from branches. + 2012-06-21 Ramon Novoa * DEBIAN/control, diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 5c621b3091..bcb993fed1 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1389,6 +1389,9 @@ sub pandora_delete_module ($$;$) { # Delete events asociated to the module db_do ($dbh, 'DELETE FROM tevento WHERE id_agentmodule = ?', $module_id); + # Delete tags asociated to the module + db_do ($dbh, 'DELETE FROM ttag_module WHERE id_agente_modulo = ?', $module_id); + # Set pending delete the module db_do ($dbh, 'UPDATE tagente_modulo SET disabled = 1, delete_pending = 1, nombre = "delete_pending" WHERE id_agente_modulo = ?', $module_id);