Update dialplan_detail_delete.php

This commit is contained in:
FusionPBX 2019-02-05 18:33:18 -07:00 committed by GitHub
parent 07c93d9855
commit a24d4b969d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 7 deletions

View File

@ -54,7 +54,7 @@
} }
//delete the dialplan detail //delete the dialplan detail
if (strlen($dialplan_detail_uuid) > 0) { if (is_uuid($dialplan_detail_uuid)) {
//delete child data //delete child data
$sql = "delete from v_dialplan_details "; $sql = "delete from v_dialplan_details ";
//$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; //$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
@ -65,12 +65,9 @@
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache //clear the cache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); $cache = new cache;
if ($fp) { $cache->delete("dialplan:".$_SESSION["context"]);
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//update the dialplan xml //update the dialplan xml
$dialplans = new dialplan; $dialplans = new dialplan;