From 911ed3d6ba98149ed6d400d554e7a0e10bd1c273 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 3 Aug 2023 05:46:08 +0000 Subject: [PATCH 1/2] Fix: Pagination in search result works again --- view/theme/frio/templates/search_item.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/view/theme/frio/templates/search_item.tpl b/view/theme/frio/templates/search_item.tpl index ef02e1064..2d130cab8 100644 --- a/view/theme/frio/templates/search_item.tpl +++ b/view/theme/frio/templates/search_item.tpl @@ -1,4 +1,8 @@
+ + + +
{{* Put additional actions in a top-right dropdown menu *}} From 858151807f5398c67d38ab3e50ddfd6e6b808810 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 3 Aug 2023 20:36:19 +0000 Subject: [PATCH 2/2] Improved logging --- src/Module/Search/Index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Search/Index.php b/src/Module/Search/Index.php index 9ec8c9dd6..f1d99bdf1 100644 --- a/src/Module/Search/Index.php +++ b/src/Module/Search/Index.php @@ -173,7 +173,7 @@ class Index extends BaseSearch $pager = new Pager(DI::l10n(), DI::args()->getQueryString(), $itemsPerPage); if ($tag) { - Logger::info('Start tag search.', ['q' => $search]); + Logger::info('Start tag search.', ['q' => $search, 'start' => $pager->getStart(), 'items' => $pager->getItemsPerPage(), 'last' => $last_uriid]); $uriids = Tag::getURIIdListByTag($search, DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage(), $last_uriid); $count = Tag::countByTag($search, DI::userSession()->getLocalUserId()); } else { @@ -185,7 +185,7 @@ class Index extends BaseSearch if (!empty($uriids)) { $condition = ["(`uid` = ? OR (`uid` = ? AND NOT `global`))", 0, DI::userSession()->getLocalUserId()]; $condition = DBA::mergeConditions($condition, ['uri-id' => $uriids]); - $params = ['order' => ['id' => true]]; + $params = ['order' => ['uri-id' => true]]; $items = Post::toArray(Post::selectForUser(DI::userSession()->getLocalUserId(), Item::DISPLAY_FIELDLIST, $condition, $params)); }