Added fallback ordering to tags list

This commit is contained in:
Alejandro Celaya 2022-01-21 20:12:16 +01:00
parent d5606114cd
commit 361e864415

View file

@ -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);
}