Remove the + from the format_phone function.
This commit is contained in:
parent
2c4101e8d0
commit
122f0bb0a2
|
|
@ -835,13 +835,16 @@ function format_string ($format, $data) {
|
||||||
|
|
||||||
//get the format and use it to format the phone number
|
//get the format and use it to format the phone number
|
||||||
function format_phone($phone_number) {
|
function format_phone($phone_number) {
|
||||||
foreach ($_SESSION["format"]["phone"] as &$format) {
|
$phone_number = trim($phone_number, "+");
|
||||||
$format_count = substr_count($format, 'x');
|
if (is_numeric($phone_number)) {
|
||||||
$format_count = $format_count + substr_count($format, 'R');
|
foreach ($_SESSION["format"]["phone"] as &$format) {
|
||||||
$format_count = $format_count + substr_count($format, 'r');
|
$format_count = substr_count($format, 'x');
|
||||||
if ($format_count == strlen($phone_number)) {
|
$format_count = $format_count + substr_count($format, 'R');
|
||||||
//format the number
|
$format_count = $format_count + substr_count($format, 'r');
|
||||||
$phone_number = format_string($format, $phone_number);
|
if ($format_count == strlen($phone_number)) {
|
||||||
|
//format the number
|
||||||
|
$phone_number = format_string($format, $phone_number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $phone_number;
|
return $phone_number;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue