diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index bce466ff8e..8b14da90fb 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-12-11 Sergio Martin + + * include/functions_network_components.php: Improve + network component retrieving to get the category name too + 2012-12-11 Sergio Martin * godmode/agentes/module_manager_editor_common.php diff --git a/pandora_console/include/functions_network_components.php b/pandora_console/include/functions_network_components.php index 8283d47f01..9b9c51e6a1 100644 --- a/pandora_console/include/functions_network_components.php +++ b/pandora_console/include/functions_network_components.php @@ -222,7 +222,13 @@ function network_components_get_network_component ($id_network_component, $filte $filter = array (); $filter['id_nc'] = (int) $id_network_component; - return db_get_row_filter ('tnetwork_component', $filter, $fields); + $network_component = db_get_row_filter ('tnetwork_component', $filter, $fields); + + if(!empty($network_component) && $network_component['id_category'] != 0) { + $network_component['category_name'] = (string) db_get_value('name','tcategory','id',$network_component['id_category']); + } + + return $network_component; } /**