2
0
forked from Wavyzz/dolibarr

Merge pull request #13529 from bb2a/patch-4

Display Phone link and  separ personalise in const
This commit is contained in:
Laurent Destailleur
2020-04-09 19:54:48 +02:00
committed by GitHub

View File

@@ -2378,6 +2378,7 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
// Clean phone parameter
$phone = preg_replace("/[\s.-]/", "", trim($phone));
if (empty($phone)) { return ''; }
if ($conf->global->MAIN_PHONE_SEPAR) $separ = $conf->global->MAIN_PHONE_SEPAR;
if (empty($countrycode)) $countrycode = $mysoc->country_code;
// Short format for small screens
@@ -2679,8 +2680,9 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
{
if ($conf->browser->layout == 'phone' || (!empty($conf->clicktodial->enabled) && !empty($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS))) // If phone or option for, we use link of phone
{
$newphoneform = $newphone;
$newphone = '<a href="tel:'.$phone.'"';
$newphone .= '>'.$phone.'</a>';
$newphone .= '>'.$newphoneform.'</a>';
}
elseif (!empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url
{