diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 049bebb556..45ff160ef9 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-08-02 Sergio Martin + + * include/functions_api.php: Fixed broken return of + the get module from conf function + 2012-08-02 Sergio Martin * include/functions_api.php: Change the return of the diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index dffaa68931..c7c6ad8fde 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -3243,16 +3243,16 @@ function api_set_add_module_in_conf($id_agent, $module_name, $configuration_data * * api.php?op=get&op2=module_from_conf&user=admin&pass=pandora&id=9043&id2=example_name * - * @return string 0 when success, -1 when error + * @return string Module data when success, empty when error */ function api_get_module_from_conf($id_agent, $module_name, $thrash2, $thrash3) { $result = enterprise_hook('config_agents_get_module_from_conf', array($id_agent, io_safe_output($module_name))); if($result !== ENTERPRISE_NOT_HOOK) { - returnData('string', array('type' => 'string', 'data' => '0')); + returnData('string', array('type' => 'string', 'data' => $result)); } else { - returnError('error_adding_module_conf', '-1'); + returnError('error_adding_module_conf', ''); } }