Fixed that groups are shown with no access privileges.

This commit is contained in:
Junichi Satoh 2015-10-05 13:50:39 +09:00
parent 71372e2630
commit 07078b38e9
1 changed files with 7 additions and 13 deletions

View File

@ -636,11 +636,11 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0,
} }
// Get groups data // Get groups data
if ($group > 0) {
$groups = array(); $groups = array();
$id_groups = groups_get_id_recursive($group, true); $id_groups = groups_get_id_recursive($group, true);
foreach($id_groups as $id_group) { foreach($id_groups as $id_group) {
if ($id_group != 0) {
$add = false; $add = false;
if (check_acl($config["id_user"], $id_group, 'AR')) { if (check_acl($config["id_user"], $id_group, 'AR')) {
$add = true; $add = true;
@ -650,15 +650,9 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0,
$groups[] = db_get_row ('tgrupo', 'id_grupo', $id_group); $groups[] = db_get_row ('tgrupo', 'id_grupo', $id_group);
} }
} }
}
$filter['id_grupo'] = $id_groups; $filter['id_grupo'] = $id_groups;
}
else {
$groups = db_get_all_rows_in_table ('tgrupo');
if ($groups === false) {
$groups = array();
}
}
// Open Graph // Open Graph
$graph = networkmap_open_graph ($layout, $nooverlap, $pure, $zoom, $ranksep, $font_size); $graph = networkmap_open_graph ($layout, $nooverlap, $pure, $zoom, $ranksep, $font_size);