diff --git a/admin/getgroups.php b/admin/getgroups.php index f32cbfd..c7bce58 100644 --- a/admin/getgroups.php +++ b/admin/getgroups.php @@ -56,12 +56,13 @@ function getGroups($part) { $last_string = trim(array_pop($array)); $retval = array(); if ($last_string != '') { + $prefix = count($array) ? implode(",", $array) . ", ": ''; $groups = file($GLOBALS['davconfig']['group.file']); foreach ($groups as $line) { list($group, $users) = explode(":", $line); $group = trim($group); if (stripos($group, $last_string) === 0) { - array_push($retval, $group); + $retval[$prefix . $group] = $group; } } }