Skip to content

Commit

Permalink
Sort groups when requested from DB
Browse files Browse the repository at this point in the history
This makes for deterministic output, especially on Oracle
  • Loading branch information
Vincent Petry committed Nov 29, 2018
1 parent f13c1c9 commit 30b3724
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/CustomGroupsDatabaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public function getGroupsByDisplayName($displayName) {
$cursor = $qb->select(['group_id', 'uri', 'display_name'])
->from('custom_group')
->where($qb->expr()->eq($qb->createFunction('LOWER(`display_name`)'), $qb->createNamedParameter(\strtolower($displayName))))
->orderBy('display_name', 'ASC');
->execute();

$results = $cursor->fetchAll();
Expand Down

0 comments on commit 30b3724

Please sign in to comment.