|
|
|
@ -359,9 +359,9 @@ class CarInfoHandle |
|
|
|
|
$phones = [$source['car_phone']]; |
|
|
|
|
$phones_a = [$source_a['car_phone']]; |
|
|
|
|
foreach (['id_phone', 'insured_phone', 'link_phone_1', 'link_phone_2', 'link_phone_3'] as $key) { |
|
|
|
|
if (preg_match('/^1[3-9][0-9]{9}/', $source_a[$key]) && !in_array($phones_a, $source_a[$key])) |
|
|
|
|
if (preg_match('/^1[3-9][0-9]{9}/', $source_a[$key]) && !in_array($source_a[$key], $phones_a)) |
|
|
|
|
$phones_a[] = $source_a[$key]; |
|
|
|
|
if (preg_match('/^1[3-9][0-9]{9}/', $source[$key]) && !in_array($phones, $source[$key])) |
|
|
|
|
if (preg_match('/^1[3-9][0-9]{9}/', $source[$key]) && !in_array($source[$key], $phones)) |
|
|
|
|
$phones[] = $source[$key]; |
|
|
|
|
} |
|
|
|
|
$phones = array_unique(array_merge($phones_a, $phones)); |
|
|
|
@ -369,7 +369,7 @@ class CarInfoHandle |
|
|
|
|
if (count($phones) <= 6) { |
|
|
|
|
array_shift($phones); |
|
|
|
|
foreach (['id_phone', 'insured_phone', 'link_phone_1', 'link_phone_2', 'link_phone_3'] as $key) { |
|
|
|
|
if (!in_array($phones, $source_a[$key])) |
|
|
|
|
if (!in_array($source_a[$key], $phones)) |
|
|
|
|
$source_a[$key] = array_shift($phones); |
|
|
|
|
if (empty($source_a[$key])) |
|
|
|
|
break; |
|
|
|
|