From 4586412e6863385c48ce6de5a27a757d2ce48e4c Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Mon, 13 Sep 2010 07:41:06 +0000 Subject: [PATCH] 2010-09-13 Sergio Martin * godmode/agentes/configurar_agente.php: Added local module deletion in conf file to another place where the modules can be deleted. Clean the code too git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3240 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/godmode/agentes/configurar_agente.php | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4f44f40bc9..5e8202766a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-09-13 Sergio Martin + + * godmode/agentes/configurar_agente.php: Added local module + deletion in conf file to another place where the modules can + be deleted. Clean the code too + 2010-09-13 Sergio Martin * include/functions_modules.php: Added the local module diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 1e2c3e3b88..5b8a7ceea3 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -502,6 +502,7 @@ if ($id_agente) { $update_module = (bool) get_parameter ('update_module'); $create_module = (bool) get_parameter ('create_module'); +$delete_module = (bool) get_parameter ('delete_module'); $edit_module = (bool) get_parameter ('edit_module'); // GET DATA for MODULE UPDATE OR MODULE INSERT @@ -711,7 +712,7 @@ if ($create_module) { // MODULE DELETION // ================= -if (isset ($_GET["delete_module"])){ // DELETE agent module ! +if ($delete_module){ // DELETE agent module ! $id_borrar_modulo = (int) get_parameter_get ("delete_module",0); $module_data = get_db_row ('tagente_modulo', 'id_agente_modulo', $id_borrar_modulo); $id_grupo = (int) dame_id_grupo ($id_agente); @@ -730,6 +731,9 @@ if (isset ($_GET["delete_module"])){ // DELETE agent module ! exit; } + enterprise_include_once('include/functions_config_agents.php'); + enterprise_hook('deleteLocalModuleInConf', array(get_agentmodule_agent($id_borrar_modulo), get_agentmodule_name($id_borrar_modulo))); + //Init transaction $error = 0; process_sql_begin ();