Update domain_edit.php
This commit is contained in:
@@ -145,12 +145,27 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
|
|
||||||
// update dialplans
|
// update dialplans
|
||||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")){
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")){
|
||||||
$sql = "update v_dialplans set ";
|
$sql = "update v_dialplans ";
|
||||||
$sql .= "dialplan_context = '".$domain_name."' ";
|
$sql .= "set dialplan_context = '".$domain_name."' ";
|
||||||
$sql .= "where dialplan_context = '".$original_domain_name."' ";
|
$sql .= "where dialplan_context = '".$original_domain_name."' ";
|
||||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
|
$sql = "update v_dialplans ";
|
||||||
|
$sql .= "set dialplan_xml = replace(dialplan_xml, $original_domain_name, $domain_name); ";
|
||||||
|
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
// update destinations
|
||||||
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/destinations/app_config.php")){
|
||||||
|
$sql = "update v_destinations ";
|
||||||
|
$sql .= "set destination_data = replace(destination_data, $original_domain_name, $domain_name); ";
|
||||||
|
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update extensions (accountcode, user_context, dial_domain)
|
// update extensions (accountcode, user_context, dial_domain)
|
||||||
@@ -717,4 +732,5 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user