mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-07 13:59:43 +00:00
Temporarily desactivate the search by phonenumber
This commit is contained in:
@@ -161,6 +161,12 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor
|
||||
$andWhereSearchClause[] = '('.implode(' OR ', $q).')';
|
||||
$andWhereSearchClauseArgs = [...$andWhereSearchClauseArgs, ...$qArguments];
|
||||
}
|
||||
/*
|
||||
if (null !== $phonenumber) {
|
||||
$andWhereSearchClause[] =
|
||||
"person.phonenumber LIKE '%' || ? || '%' OR person.mobilenumber LIKE '%' || ? || '%' OR (EXISTS (SELECT 1 FROM chill_person_phone WHERE person.id = person_id AND phonenumber LIKE '%' || ? || '%'))";
|
||||
array_push($andWhereSearchClauseArgs, $phonenumber, $phonenumber, $phonenumber);
|
||||
} */
|
||||
|
||||
$query->andWhereClause(
|
||||
\implode(' AND ', $andWhereSearchClause),
|
||||
@@ -208,13 +214,6 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor
|
||||
);
|
||||
}
|
||||
|
||||
if (null !== $phonenumber) {
|
||||
$query->andWhereClause(
|
||||
"person.phonenumber LIKE '%' || ? || '%' OR person.mobilenumber LIKE '%' || ? || '%' OR pp.phonenumber LIKE '%' || ? || '%'",
|
||||
[$phonenumber, $phonenumber, $phonenumber]
|
||||
);
|
||||
$query->setFromClause($query->getFromClause().' LEFT JOIN chill_person_phone pp ON pp.person_id = person.id');
|
||||
}
|
||||
|
||||
if (null !== $city) {
|
||||
$query->setFromClause($query->getFromClause().' '.
|
||||
|
Reference in New Issue
Block a user