From 361e864415a0926f96a24be07c8c5fee8d0e7625 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 21 Jan 2022 20:12:16 +0100 Subject: [PATCH] Added fallback ordering to tags list --- module/Core/src/Repository/TagRepository.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/Core/src/Repository/TagRepository.php b/module/Core/src/Repository/TagRepository.php index 7e69dcc9..c0ab0d2e 100644 --- a/module/Core/src/Repository/TagRepository.php +++ b/module/Core/src/Repository/TagRepository.php @@ -101,6 +101,7 @@ class TagRepository extends EntitySpecificationRepository implements TagReposito $orderField === 'shortUrlsCount' ? 'short_urls_count' : 'visits_count', $orderBy?->orderDirection() ?? 'ASC', ) + ->addOrderBy('t.name_1', 'ASC') // In case of same amount, order by tag too ->setMaxResults($filtering?->limit() ?? PHP_INT_MAX) ->setFirstResult($filtering?->offset() ?? 0); }