From 3bed9c8a5e5cff7f2c533d650b3c1f2ce8731621 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 12 Jul 2024 02:48:44 -0600 Subject: [PATCH] Update contact phone number search Update the phone search to use the country code and phone number or the phone number alone. --- app/contacts/contacts.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/contacts/contacts.php b/app/contacts/contacts.php index 69b19d5970..632dc09078 100644 --- a/app/contacts/contacts.php +++ b/app/contacts/contacts.php @@ -135,7 +135,10 @@ if (is_numeric($search)) { $sql_search = "and contact_uuid in ( "; $sql_search .= " select contact_uuid from v_contact_phones "; - $sql_search .= " where phone_number like :search "; + $sql_search .= " where ( "; + $sql_search .= " concat(phone_country_code, phone_number) like :search "; + $sql_search .= " or phone_number like :search "; + $sql_search .= " ) "; $sql_search .= ") "; } else {