From c90f5ff7ff25d00a088095c1c852f30e422f9c1b Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 28 Aug 2013 09:16:19 +0000 Subject: [PATCH] 2013-08-28 Miguel de Dios * include/functions_modules.php: fixed the massive copy modules between agents. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8705 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_modules.php | 18 ++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3f7b68b4aa..e3505693fd 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-08-28 Miguel de Dios + + * include/functions_modules.php: fixed the massive copy modules + between agents. + 2013-08-28 Miguel de Dios * godmode/agentes/module_manager_editor.php, diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 4c05703943..798926042c 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -200,16 +200,14 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent $id_agente = modules_get_agentmodule_agent($id_agent_module); - $file = enterprise_hook('config_agents_get_agent_config_filenames', $id_agente); - $agent_md5 = $file['md5']; - $remote_conf = $file['conf']; - - if ($remote_conf) { - $result = enterprise_hook('config_agents_copy_agent_module_to_agent', - array($id_agent_module, $id_new_module)); - - if ($result === false) - return false; + if (enterprise_installed()) { + if (config_agents_has_remote_configuration($id_agente)) { + $result = enterprise_hook('config_agents_copy_agent_module_to_agent', + array($id_agent_module, $id_new_module)); + + if ($result === false) + return false; + } } return $id_new_module;