From: Michael Date: Thu, 21 Jun 2018 07:46:06 +0000 (+0000) Subject: Order search results by id X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=81ac7c33da119dbe0f9c4185c795b965305beb9d;p=friendica.git Order search results by id --- 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);