From ca84bc8dbacf9d9e20e60bbd4cc703ccfe6d7c3e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 28 Jun 2017 20:55:43 -0600 Subject: [PATCH] Update dialplan_edit.php --- app/dialplan/dialplan_edit.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/dialplan/dialplan_edit.php b/app/dialplan/dialplan_edit.php index 6bfeef73f9..b4d690e45f 100644 --- a/app/dialplan/dialplan_edit.php +++ b/app/dialplan/dialplan_edit.php @@ -127,6 +127,11 @@ $dialplan_name = str_replace(" ", "_", $dialplan_name); $dialplan_name = str_replace("/", "", $dialplan_name); + //default app_uuid + if (strlen($app_uuid) == 0) { + $app_uuid = uuid(); + } + //build the array $x = 0; if (isset($_POST["dialplan_uuid"])) { @@ -142,6 +147,7 @@ else { $array['dialplans'][$x]['domain_uuid'] = $_SESSION['domain_uuid']; } + $array['dialplans'][$x]['app_uuid'] = $app_uuid; $array['dialplans'][$x]['hostname'] = $hostname; $array['dialplans'][$x]['dialplan_name'] = $dialplan_name; $array['dialplans'][$x]['dialplan_number'] = $_POST["dialplan_number"]; @@ -177,7 +183,7 @@ $database->app_uuid = $app_uuid; $database->uuid($dialplan_uuid); $database->save($array); - //$message = $database->message; + $message = $database->message; } //update the dialplan xml @@ -228,6 +234,14 @@ unset ($prep_statement); } +//set the defaults + if (strlen($dialplan_context) == 0) { + $dialplan_context = $_SESSION['domain_name']; + } + if (strlen($dialplan_order) == 0) { + $dialplan_order = '200'; + } + //get the dialplan details in an array $sql = "select * from v_dialplan_details "; $sql .= "where dialplan_uuid = '$dialplan_uuid' ";