mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
"for iPhone and Android: replace evtl. configured telephony integration link with tel: protocoll"
This commit is contained in:
parent
c60a1ad94d
commit
a858db5eb8
@ -223,17 +223,21 @@ class url_widget
|
||||
*/
|
||||
static function phone2link($number)
|
||||
{
|
||||
// for iPhone and Android: replace evtl. configured telephony integration link with tel: protocoll
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'],'AppleWebKit') !== false &&
|
||||
(strpos($_SERVER['HTTP_USER_AGENT'],'iPhone') !== false || strpos($_SERVER['HTTP_USER_AGENT'],'Android') !== false))
|
||||
static $call_link;
|
||||
if (is_null($call_link))
|
||||
{
|
||||
$call_link = 'tel:%1';
|
||||
// for iPhone and Android: replace evtl. configured telephony integration link with tel: protocol
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'],'AppleWebKit') !== false &&
|
||||
(strpos($_SERVER['HTTP_USER_AGENT'],'iPhone') !== false || strpos($_SERVER['HTTP_USER_AGENT'],'Android') !== false))
|
||||
{
|
||||
$call_link = 'tel:%1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_link = (string)$GLOBALS['egw_info']['server']['call_link'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_link = $GLOBALS['egw_info']['server']['call_link'];
|
||||
}
|
||||
if (!$number || empty($call_link)) return false;
|
||||
if (empty($number) || empty($call_link)) return false;
|
||||
|
||||
static $userphone;
|
||||
if (is_null($userphone) && strpos($call_link,'%t') !== false)
|
||||
|
Loading…
Reference in New Issue
Block a user