Fixed sql error when searchs in empty father groups. Ticket#3347
This commit is contained in:
parent
6e1b0d32be
commit
be166593cb
|
@ -670,6 +670,7 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
|
|||
//Eliminate the first comma
|
||||
$fathers_id = substr($fathers_id, 1);
|
||||
//Takes the parents even without agents, complete groups
|
||||
if ($fathers_id) {
|
||||
$list_father_groups = db_get_all_rows_sql("
|
||||
SELECT *
|
||||
FROM tgrupo
|
||||
|
@ -679,6 +680,7 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
|
|||
//Merges the arrays and eliminates the duplicates groups
|
||||
$list_groups = array_merge($list_groups, $list_father_groups);
|
||||
}
|
||||
}
|
||||
$list_groups = groupview_array_unique_multidim($list_groups, 'id_grupo');
|
||||
//Order groups (Father-children)
|
||||
$ordered_groups = groupview_order_groups_for_parents($list_groups);
|
||||
|
|
Loading…
Reference in New Issue