mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
* EPL/CTI/Addressbook: phone numbers written with unusual separator like pipe symbol where not found
This commit is contained in:
parent
cac2508c4a
commit
fc003c613b
@ -2934,7 +2934,8 @@ class Contacts extends Contacts\Storage
|
||||
if (substr($name, 0, 4) === 'tel_' && !empty($value))
|
||||
{
|
||||
try {
|
||||
$tel = $phoneNumberUtil->parse($value,
|
||||
// we sanitize the number a little, as phoneNumberUtil e.g. chokes on pipe char ("|") when used in phone numbers
|
||||
$tel = $phoneNumberUtil->parse(preg_replace('/[^+0-9()\/ -]+/', '', $value),
|
||||
// prefer region of contact, to eg. be able to parse US numbers starting direct with areacode but no leading 0
|
||||
$row[substr($name, -5) === '_home' ? 'adr_two_countrycode' : 'adr_one_countrycode'] ?:
|
||||
$row['adr_one_countrycode'] ?: $region);
|
||||
|
Loading…
Reference in New Issue
Block a user