1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-01-03 23:42:28 +03:00

Tags: Stopped recycle bin tags being counted on index

For #4892
Added test to cover.
This commit is contained in:
Dan Brown
2024-04-15 18:44:59 +01:00
parent d9ff001ffe
commit f05ec4cc26
3 changed files with 44 additions and 2 deletions

View File

@@ -38,7 +38,8 @@ class TagRepo
DB::raw('SUM(IF(entity_type = \'book\', 1, 0)) as book_count'),
DB::raw('SUM(IF(entity_type = \'bookshelf\', 1, 0)) as shelf_count'),
])
->orderBy($sort, $listOptions->getOrder());
->orderBy($sort, $listOptions->getOrder())
->whereHas('entity');
if ($nameFilter) {
$query->where('name', '=', $nameFilter);