mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
add base authorization to person search + improve search ordering
This commit is contained in:
@@ -88,13 +88,13 @@ class SearchApi
|
||||
|
||||
private function buildCountQuery(array $queries, $types, $parameters)
|
||||
{
|
||||
$query = "SELECT COUNT(sq.key) AS count FROM ({union_unordered}) AS sq";
|
||||
$query = "SELECT COUNT(*) AS count FROM ({union_unordered}) AS sq";
|
||||
$unions = [];
|
||||
$parameters = [];
|
||||
|
||||
foreach ($queries as $q) {
|
||||
$unions[] = $q->buildQuery();
|
||||
$parameters = \array_merge($parameters, $q->buildParameters());
|
||||
$unions[] = $q->buildQuery(true);
|
||||
$parameters = \array_merge($parameters, $q->buildParameters(true));
|
||||
}
|
||||
|
||||
$unionUnordered = \implode(" UNION ", $unions);
|
||||
|
Reference in New Issue
Block a user