mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
fix for US numbers formatted as "+1 123-456-7890"
This commit is contained in:
parent
260d8f523a
commit
26492c4260
@ -2835,9 +2835,10 @@ class Contacts extends Contacts\Storage
|
||||
}
|
||||
if ($only_keys === true) $only_keys = false;
|
||||
$start = false; // no pagination
|
||||
list($country, $area, $rest) = explode(' ',
|
||||
// returns "+49 123 4567890" or "+1 123-456-7890"
|
||||
list($country, $area, $rest) = preg_split('/[ -]/',
|
||||
$phoneNumberUtil->format($number, \libphonenumber\PhoneNumberFormat::INTERNATIONAL), 3);
|
||||
$rest_without_space = str_replace(' ', '', $rest);
|
||||
$rest_without_space = preg_replace('/[^0-9]/', '', $rest);
|
||||
/** @var Contacts\Sql */
|
||||
$backend = $this->get_backend(null, $filter['owner']);
|
||||
// SQL Backend supporting regexp_replace (MySQL 8.0+ or MariaDB 10.0+ or PostgreSQL)
|
||||
|
Loading…
Reference in New Issue
Block a user