mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-09 15:00:58 +01:00
remove stupid (0) from phone numbers written as "+49 (0) 123 1234567"
This commit is contained in:
parent
4119c06da0
commit
272282e573
@ -246,7 +246,7 @@ class url_widget
|
|||||||
$user = $GLOBALS['egw']->contacts->read('account:'.$GLOBALS['egw_info']['user']['account_id']);
|
$user = $GLOBALS['egw']->contacts->read('account:'.$GLOBALS['egw_info']['user']['account_id']);
|
||||||
$userphone = is_array($user) ? ($user['tel_work'] ? $user['tel_work'] : $user['tel_home']) : false;
|
$userphone = is_array($user) ? ($user['tel_work'] ? $user['tel_work'] : $user['tel_home']) : false;
|
||||||
}
|
}
|
||||||
$number = preg_replace('/[^0-9+]+/','',str_replace('♥','',$number)); // remove number formatting chars messing up the links
|
$number = preg_replace('/[^0-9+]+/','',str_replace(array('♥','(0)'),'',$number)); // remove number formatting chars messing up the links
|
||||||
|
|
||||||
return str_replace(array('%1','%u','%t'),array(urlencode($number),$GLOBALS['egw_info']['user']['account_lid'],$userphone),
|
return str_replace(array('%1','%u','%t'),array(urlencode($number),$GLOBALS['egw_info']['user']['account_lid'],$userphone),
|
||||||
$call_link);
|
$call_link);
|
||||||
|
Loading…
Reference in New Issue
Block a user