diff --git a/app/dialplans/dialplan_add.php b/app/dialplans/dialplan_add.php index e7115faa20..3b2ba58290 100644 --- a/app/dialplans/dialplan_add.php +++ b/app/dialplans/dialplan_add.php @@ -252,16 +252,14 @@ //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:".$dialplan_context; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } + //clear the cache + $cache = new cache; + $cache->delete("dialplan:".$_SESSION["context"]); - message::add($text['message-update']); - header("Location: ".PROJECT_PATH."/app/dialplans/dialplans.php"); - return; + //send a message and redirect the user + message::add($text['message-update']); + header("Location: ".PROJECT_PATH."/app/dialplans/dialplans.php"); + return; } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) //initialize the destinations object