diff --git a/app/dialplans/dialplan_detail_edit.php b/app/dialplans/dialplan_detail_edit.php index aeddf1be7d..35e678d7c9 100644 --- a/app/dialplans/dialplan_detail_edit.php +++ b/app/dialplans/dialplan_detail_edit.php @@ -136,13 +136,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //synchronize the xml config save_dialplan_xml(); - //delete the dialplan context from memcache - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - $switch_cmd = "memcache delete dialplan:".$_SESSION["context"]; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } + //clear the cache + $cache = new cache; + $cache->delete("dialplan:".$_SESSION["context"]); + //set the message and redirect the user message::add($text['message-add']); header("Location: dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=".$app_uuid); return; @@ -485,4 +483,4 @@ function replace_param(obj){ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>