T1402: Fix bug where contact groups with the same name could be displayed as one
This commit is contained in:
parent
0b59c065ad
commit
4d7a3f5e86
1 changed files with 5 additions and 4 deletions
|
@ -302,12 +302,13 @@ class rcube_kolab_contacts extends rcube_addressbook
|
|||
$groups = array();
|
||||
|
||||
foreach ((array)$this->distlists as $group) {
|
||||
if (!$search || strstr(strtolower($group['name']), strtolower($search)))
|
||||
$groups[$group['name']] = array('ID' => $group['ID'], 'name' => $group['name']);
|
||||
if (!$search || strstr(mb_strtolower($group['name']), mb_strtolower($search))) {
|
||||
$groups[$group['ID']] = array('ID' => $group['ID'], 'name' => $group['name']);
|
||||
}
|
||||
}
|
||||
|
||||
// sort groups
|
||||
ksort($groups, SORT_LOCALE_STRING);
|
||||
// sort groups by name
|
||||
uasort($groups, function($a, $b) { return strcoll($a['name'], $b['name']); });
|
||||
|
||||
return array_values($groups);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue