]> git.mxchange.org Git - friendica.git/commitdiff
Order search results by id
authorMichael <heluecht@pirati.ca>
Thu, 21 Jun 2018 07:46:06 +0000 (07:46 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 21 Jun 2018 07:46:06 +0000 (07:46 +0000)
mod/search.php

index 6580246e4a4122faba4f94aeb0a216dddffca44b..0790098a5373ae95333a383381f5be18ff01f9a9 100644 (file)
@@ -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);