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();
|
$groups = array();
|
||||||
|
|
||||||
foreach ((array)$this->distlists as $group) {
|
foreach ((array)$this->distlists as $group) {
|
||||||
if (!$search || strstr(strtolower($group['name']), strtolower($search)))
|
if (!$search || strstr(mb_strtolower($group['name']), mb_strtolower($search))) {
|
||||||
$groups[$group['name']] = array('ID' => $group['ID'], 'name' => $group['name']);
|
$groups[$group['ID']] = array('ID' => $group['ID'], 'name' => $group['name']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort groups
|
// sort groups by name
|
||||||
ksort($groups, SORT_LOCALE_STRING);
|
uasort($groups, function($a, $b) { return strcoll($a['name'], $b['name']); });
|
||||||
|
|
||||||
return array_values($groups);
|
return array_values($groups);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue