mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-14 20:48:48 +00:00
Remove the is_numeric on format_phone.
This commit is contained in:
@@ -771,15 +771,13 @@ function format_string ($format, $data) {
|
||||
|
||||
//get the format and use it to format the phone number
|
||||
function format_phone($phone_number) {
|
||||
if (is_numeric($phone_number)) {
|
||||
foreach ($_SESSION["format"]["phone"] as &$format) {
|
||||
$format_count = substr_count($format, 'x');
|
||||
$format_count = $format_count + substr_count($format, 'R');
|
||||
$format_count = $format_count + substr_count($format, 'r');
|
||||
if ($format_count == strlen($phone_number)) {
|
||||
//format the number
|
||||
$phone_number = format_string($format, $phone_number);
|
||||
}
|
||||
foreach ($_SESSION["format"]["phone"] as &$format) {
|
||||
$format_count = substr_count($format, 'x');
|
||||
$format_count = $format_count + substr_count($format, 'R');
|
||||
$format_count = $format_count + substr_count($format, 'r');
|
||||
if ($format_count == strlen($phone_number)) {
|
||||
//format the number
|
||||
$phone_number = format_string($format, $phone_number);
|
||||
}
|
||||
}
|
||||
return $phone_number;
|
||||
|
||||
Reference in New Issue
Block a user