Skip to content

Commit

Permalink
order by viewer level
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Oct 31, 2023
1 parent 48104d8 commit e3c2b8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Db/CircleRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ public function getCircles(?IFederatedUser $initiator, CircleProbe $probe): arra
$qb->filterCircles(CoreQueryBuilder::CIRCLE, $probe);
if (!is_null($initiator)) {
$qb->limitToInitiator(CoreQueryBuilder::CIRCLE, $initiator);
$qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR) . '.level', 'desc');
$qb->addOrderBy(CoreQueryBuilder::CIRCLE . '.display_name', 'asc');
}
if ($probe->hasFilterMember()) {
$qb->limitToDirectMembership(CoreQueryBuilder::CIRCLE, $probe->getFilterMember());
Expand Down

0 comments on commit e3c2b8e

Please sign in to comment.