From 79e2024ad0e7dd839017118775d57ced9f9ab756 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 8 Aug 2013 06:23:48 +0000 Subject: [PATCH] 2013-08-07 Miguel de Dios * godmode/agentes/modificar_agente.php, godmode/agentes/module_manager_editor.php: changed the code to avoid to call enterprise functions. Fixes: #2367 *include/functions_agents.php: fixed source code style.. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8640 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 10 ++++++++++ pandora_console/godmode/agentes/modificar_agente.php | 10 ++++++---- .../godmode/agentes/module_manager_editor.php | 5 ++++- pandora_console/include/functions_agents.php | 2 +- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 202981bac8..ab87a826fd 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2013-08-07 Miguel de Dios + + * godmode/agentes/modificar_agente.php, + godmode/agentes/module_manager_editor.php: changed the code to + avoid to call enterprise functions. + + Fixes: #2367 + + *include/functions_agents.php: fixed source code style.. + 2013-08-07 Miguel de Dios * operation/agentes/estado_agente.php: fixed the call to diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index c58f32b5dd..bd2eb4495e 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -477,10 +477,12 @@ if ($agents !== false) { echo ""; // Has remote configuration ? - if (config_agents_has_remote_configuration($agent["id_agente"])) { - echo ""; - echo html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Edit remote config'))); - echo ""; + if (enterprise_installed()) { + if (config_agents_has_remote_configuration($agent["id_agente"])) { + echo ""; + echo html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Edit remote config'))); + echo ""; + } } echo ""; diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 52021cba55..484186c938 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -335,7 +335,10 @@ switch ($moduletype) { case MODULE_DATA: $moduletype = MODULE_DATA; // Has remote configuration ? - $remote_conf = config_agents_has_remote_configuration($id_agente); + $remote_conf = false; + if (enterprise_installed()) { + $remote_conf = config_agents_has_remote_configuration($id_agente); + } /* Categories is an array containing the allowed module types (generic_data, generic_string, etc) from ttipo_modulo (field categoria) */ diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 90a0ba3554..20e47526a3 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -179,7 +179,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f $disabled = ''; else $disabled = 'WHERE disabled = 0'; - + $subQuery = 'SELECT id_agente_modulo FROM tagente_modulo ' . $disabled; }