Skip to content
Snippets Groups Projects
Verified Commit 11551aac authored by Damien's avatar Damien
Browse files

FEAT #12869 TIME 0:05 Search order by chrono

parent 293ea109
No related branches found
No related tags found
No related merge requests found
......@@ -147,7 +147,7 @@ class SearchController
$offset = (int)$queryParams['offset'];
}
$order = !in_array($queryParams['order'], ['asc', 'desc']) ? '' : $queryParams['order'];
$orderBy = str_replace(['chrono', 'typeLabel', 'creationDate'], ['alt_identifier', 'type_label', 'creation_date'], $queryParams['orderBy']);
$orderBy = str_replace(['chrono', 'typeLabel', 'creationDate'], ['order_alphanum(alt_identifier)', 'type_label', 'creation_date'], $queryParams['orderBy']);
$orderBy = !in_array($orderBy, ['alt_identifier', 'status', 'subject', 'type_label', 'creation_date']) ? ['creation_date'] : ["{$orderBy} {$order}"];
$allResources = ResModel::getOnView([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment