From 81ac7c33da119dbe0f9c4185c795b965305beb9d Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 21 Jun 2018 07:46:06 +0000 Subject: [PATCH] Order search results by id --- mod/search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/search.php b/mod/search.php index 6580246e4a..0790098a53 100644 --- a/mod/search.php +++ b/mod/search.php @@ -211,7 +211,8 @@ function search_content(App $a) { } dba::close($terms); - $items = Item::selectForUser(local_user(), [], ['id' => array_reverse($itemids)]); + $params = ['order' => ['id' => true]]; + $items = Item::selectForUser(local_user(), [], ['id' => $itemids], $params); $r = dba::inArray($items); } else { logger("Start fulltext search for '".$search."'", LOGGER_DEBUG); -- 2.39.5