Update destination_edit.php

Replace string_to_regex with destination to_regex method.
This commit is contained in:
FusionPBX 2020-10-10 00:06:38 -06:00 committed by GitHub
parent cd3ed425de
commit 3283140022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -258,7 +258,21 @@
}
//convert the number to a regular expression
$destination_number_regex = string_to_regex($destination_area_code.$destination_number, $destination_prefix);
if (isset($destination_prefix) && strlen($destination_prefix) > 0) {
$destination_numbers['destination_prefix'] = $destination_prefix;
}
if (isset($destination_trunk_prefix) && strlen($destination_trunk_prefix) > 0) {
$destination_numbers['destination_trunk_prefix'] = $destination_trunk_prefix;
}
if (isset($destination_area_code) && strlen($destination_area_code) > 0) {
$destination_numbers['destination_area_code'] = $destination_area_code;
}
if (isset($destination_number) && strlen($destination_number) > 0) {
$destination_numbers['destination_number'] = $destination_number;
}
$destination = new destinations;
$destination_number_regex = $destination->to_regex($destination_numbers);
unset($destination_numbers);
//if empty then get new uuid
if (!is_uuid($dialplan_uuid)) {