Temporarily desactivate the search by phonenumber

This commit is contained in:
2025-10-07 11:53:24 +02:00
parent d4f9726f90
commit c030232a73

View File

@@ -161,6 +161,12 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor
$andWhereSearchClause[] = '('.implode(' OR ', $q).')'; $andWhereSearchClause[] = '('.implode(' OR ', $q).')';
$andWhereSearchClauseArgs = [...$andWhereSearchClauseArgs, ...$qArguments]; $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( $query->andWhereClause(
\implode(' AND ', $andWhereSearchClause), \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) { if (null !== $city) {
$query->setFromClause($query->getFromClause().' '. $query->setFromClause($query->getFromClause().' '.