From bc7930f23f7cbde6caa2dbfd41ae08824dfa867d Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 20 Sep 2012 09:05:12 +0000 Subject: [PATCH] Call flows make sure the dialplan detail is deleted. --- app/call_flows/call_flow_edit.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/call_flows/call_flow_edit.php b/app/call_flows/call_flow_edit.php index c30ea9aa94..12ac4f0c91 100644 --- a/app/call_flows/call_flow_edit.php +++ b/app/call_flows/call_flow_edit.php @@ -194,12 +194,19 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "add" || $action == "update") { - //if the dialplan entry does not exist then add it + //delete the dialplan $sql = "delete from v_dialplans "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "and dialplan_uuid = '".$dialplan_uuid."' "; $db->query(check_sql($sql)); + //delete the dialplan details + $sql = "delete from v_dialplan_details "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and dialplan_uuid = '$dialplan_uuid' "; + $db->query($sql); + unset($sql); + //add the dialplan entry $dialplan_name = $call_flow_name; $dialplan_order ='333';