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 e74d61bb1b
commit 304e4be112
1 changed files with 11 additions and 5 deletions

View File

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