Sort archive page by archived at

This commit is contained in:
Jeremy Benoist 2018-09-21 11:18:29 +02:00
parent 7c0d682687
commit 9007fe0062
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
2 changed files with 1 additions and 3 deletions

View file

@ -532,11 +532,9 @@ class EntryController extends Controller
switch ($type) {
case 'search':
$qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm, $currentRoute);
break;
case 'untagged':
$qb = $repository->getBuilderForUntaggedByUser($this->getUser()->getId());
break;
case 'starred':
$qb = $repository->getBuilderForStarredByUser($this->getUser()->getId());

View file

@ -50,7 +50,7 @@ class EntryRepository extends EntityRepository
public function getBuilderForArchiveByUser($userId)
{
return $this
->getSortedQueryBuilderByUser($userId)
->getSortedQueryBuilderByUser($userId, 'archivedAt', 'desc')
->andWhere('e.isArchived = true')
;
}