Order search results by id

This commit is contained in:
Michael 2018-06-21 07:46:06 +00:00
parent 70af2cecf2
commit 81ac7c33da

View 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);