Skip to content

Commit

Permalink
Fix search when sorting alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelklehr committed May 15, 2020
1 parent fdbe69e commit abe7eaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Db/BookmarkMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ private function _queryBuilderSortAndPaginate(IQueryBuilder $qb, QueryParameters
$sqlSortColumn = $params->getSortBy('lastmodified', Bookmark::$columns);

if ($sqlSortColumn === 'title') {
$qb->orderBy($qb->createFunction('UPPER(`title`)'), 'ASC');
$qb->orderBy($qb->createFunction('UPPER(`b`.`title`)'), 'ASC');
} else {
$qb->orderBy($sqlSortColumn, 'DESC');
$qb->orderBy('b.'.$sqlSortColumn, 'DESC');
}

if ($params->getLimit() !== -1) {
Expand Down

0 comments on commit abe7eaf

Please sign in to comment.