diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4203689aca..f6a896dd95 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-04-24 Esteban Sánchez + + * godmode/agentes/module_manager.php: Added extra parameter to + enterprise_hook call. + + * include/functions_modules.php: Added get_network_component_group_name() + 2009-04-24 Manuel Arostegui * operation/agentes/status_monitor.php: Fixed bug #2779382 diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index bf502bbdcb..6d6aef9f5d 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -54,7 +54,9 @@ if ($wmi_available) $modules['wmiserver'] = __('Create a new WMI Server module'); if ($prediction_available) $modules['predictionserver'] = __('Create a new prediction Server module'); -enterprise_hook ('set_enterprise_module_types', array (&$modules)); +if (!isset ($local_components)) + $local_components = false; +enterprise_hook ('set_enterprise_module_types', array (&$modules, $local_components)); print_select ($modules, 'moduletype', '', '', '', '', false, false, false); print_input_hidden ('edit_module', 1); echo ''; diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 9f824b8a00..b7975e2c94 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -156,6 +156,20 @@ function get_network_component_groups ($id_module_components = 0) { return $retval; } +/** + * Get the name of a network components group. + * + * @param int Network components group id. + * + * @return string The name of the components group. + */ +function get_network_component_group_name ($id_network_component_group) { + if (empty ($id_network_component_group)) + return false; + + return @get_db_value ('name', 'tnetwork_component_group', 'id_sg', $id_network_component_group); +} + /** * Deletes a module from an agent. *