Merge pull request #3889 from nextcloud/downstream-26950
Sharing dialog: make autocomplete sorting case insensitive
This commit is contained in:
commit
d197f609a8
|
@ -193,7 +193,7 @@ class Database extends Backend implements IUserBackend {
|
|||
|
||||
$displayNames = array();
|
||||
$query = \OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users`'
|
||||
. $searchLike .' ORDER BY `uid` ASC', $limit, $offset);
|
||||
. $searchLike .' ORDER BY LOWER(`displayname`), LOWER(`uid`) ASC', $limit, $offset);
|
||||
$result = $query->execute($parameters);
|
||||
while ($row = $result->fetchRow()) {
|
||||
$displayNames[$row['uid']] = $row['displayname'];
|
||||
|
@ -284,7 +284,7 @@ class Database extends Backend implements IUserBackend {
|
|||
$searchLike = ' WHERE LOWER(`uid`) LIKE LOWER(?)';
|
||||
}
|
||||
|
||||
$query = \OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users`' . $searchLike . ' ORDER BY `uid` ASC', $limit, $offset);
|
||||
$query = \OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users`' . $searchLike . ' ORDER BY LOWER(`uid`) ASC', $limit, $offset);
|
||||
$result = $query->execute($parameters);
|
||||
$users = array();
|
||||
while ($row = $result->fetchRow()) {
|
||||
|
|
|
@ -254,7 +254,7 @@ class Manager extends PublicEmitter implements IUserManager {
|
|||
* @var \OC\User\User $a
|
||||
* @var \OC\User\User $b
|
||||
*/
|
||||
return strcmp($a->getDisplayName(), $b->getDisplayName());
|
||||
return strcmp(strtolower($a->getDisplayName()), strtolower($b->getDisplayName()));
|
||||
});
|
||||
return $users;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue