diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b31f9025df..40299573f1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ + +2008-10-15 Sancho Lerena + + * include/functions.php: Enterprise hook functions upgrade. + 2008-10-15 Ramon Novoa * godmode/agentes/module_manager_editor_network.php: Removed SNMP diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 78f082a297..cf553457ee 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -19,6 +19,8 @@ require_once ('functions_html.php'); +define ('ENTERPRISE_NOT_HOOK', -1); + /** * Prints a help tip icon. * @@ -1199,9 +1201,13 @@ function safe_sql_string ($string) { return $string; } -function enterprise_hook ($function_name) { - if (function_exists ($function_name)) - call_user_func ($function_name); +function enterprise_hook ($function_name, $parameters = false) { + if (function_exists ($function_name)) { + if (!is_array ($parameters)) + return call_user_func ($function_name); + return call_user_func_array ($function_name, $parameters); + } + return ENTERPRISE_NOT_HOOK; } function enterprise_include ($filename) { @@ -1212,7 +1218,7 @@ function enterprise_include ($filename) { include ($fullfilename); return true; } - return false; + return ENTERPRISE_NOT_HOOK; } ?>