Only show user's tags in monitor detail (tree view). Ticket #1356.

This commit is contained in:
Vanessa Gil 2014-09-30 12:11:10 +02:00
parent 47838c5dd1
commit 4b8fe4225b

View File

@ -112,13 +112,19 @@ function treeview_printModuleTable($id_module, $server_data = false) {
$tags = array(); $tags = array();
} }
$user_tags = tags_get_user_tags($config["id_user"]);
foreach ($tags as $k => $v) { foreach ($tags as $k => $v) {
$tag_name = tags_get_name($v); if (!array_key_exists($v, $user_tags)) { //only show user's tags.
if (empty($tag_name)) {
unset($tags[$k]); unset($tags[$k]);
} } else {
else { $tag_name = tags_get_name($v);
$tags[$k] = $tag_name; if (empty($tag_name)) {
unset($tags[$k]);
}
else {
$tags[$k] = $tag_name;
}
} }
} }