From 6573f7a72b6b636b041631d275b954fca0f41044 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 11 Dec 2012 11:35:08 +0000 Subject: [PATCH] 2012-12-11 Sergio Martin * include/functions_network_components.php: Improve network component retrieving to get the category name too git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7255 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_network_components.php | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) 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; } /**