From 117a9badb36f3080ab8e9b7b350d1f9070c6c33f Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 12 Feb 2013 13:42:24 +0000 Subject: [PATCH] 2013-02-12 Sergio Martin * godmode/agentes/configurar_agente.php: Changed the call of an Enterprise function to use HOOK to avoid errors in Open version git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7630 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/godmode/agentes/configurar_agente.php | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f3ec63a3f7..0b31af68f5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-02-12 Sergio Martin + + * godmode/agentes/configurar_agente.php: Changed the call of + an Enterprise function to use HOOK to avoid errors in + Open version + 2013-02-12 Sancho Lerena * extensions/update_manager/load_updatemanager.php diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index dbee4e8e19..b862f04742 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -729,8 +729,6 @@ if ($update_module || $create_module) { $macros = json_encode($macros); - $macros_for_data = config_agents_get_macros_data_conf($_POST); - $conf_array = explode("\n",$configuration_data); foreach($conf_array as $line) { if(preg_match("/^module_name\s*(.*)/", $line, $match)) { @@ -741,8 +739,10 @@ if ($update_module || $create_module) { $new_configuration_data .= "$line\n"; } } + + $macros_for_data = enterprise_hook('config_agents_get_macros_data_conf', array($_POST)); - if($macros_for_data != '') { + if($macros_for_data !== ENTERPRISE_NOT_HOOK && $macros_for_data != '') { // Add macros to configuration file $new_configuration_data = str_replace('module_end', $macros_for_data."module_end", $new_configuration_data); }