mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update dialplan_edit.php
This commit is contained in:
@@ -127,6 +127,11 @@
|
|||||||
$dialplan_name = str_replace(" ", "_", $dialplan_name);
|
$dialplan_name = str_replace(" ", "_", $dialplan_name);
|
||||||
$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
|
//build the array
|
||||||
$x = 0;
|
$x = 0;
|
||||||
if (isset($_POST["dialplan_uuid"])) {
|
if (isset($_POST["dialplan_uuid"])) {
|
||||||
@@ -142,6 +147,7 @@
|
|||||||
else {
|
else {
|
||||||
$array['dialplans'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
$array['dialplans'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
}
|
}
|
||||||
|
$array['dialplans'][$x]['app_uuid'] = $app_uuid;
|
||||||
$array['dialplans'][$x]['hostname'] = $hostname;
|
$array['dialplans'][$x]['hostname'] = $hostname;
|
||||||
$array['dialplans'][$x]['dialplan_name'] = $dialplan_name;
|
$array['dialplans'][$x]['dialplan_name'] = $dialplan_name;
|
||||||
$array['dialplans'][$x]['dialplan_number'] = $_POST["dialplan_number"];
|
$array['dialplans'][$x]['dialplan_number'] = $_POST["dialplan_number"];
|
||||||
@@ -177,7 +183,7 @@
|
|||||||
$database->app_uuid = $app_uuid;
|
$database->app_uuid = $app_uuid;
|
||||||
$database->uuid($dialplan_uuid);
|
$database->uuid($dialplan_uuid);
|
||||||
$database->save($array);
|
$database->save($array);
|
||||||
//$message = $database->message;
|
$message = $database->message;
|
||||||
}
|
}
|
||||||
|
|
||||||
//update the dialplan xml
|
//update the dialplan xml
|
||||||
@@ -228,6 +234,14 @@
|
|||||||
unset ($prep_statement);
|
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
|
//get the dialplan details in an array
|
||||||
$sql = "select * from v_dialplan_details ";
|
$sql = "select * from v_dialplan_details ";
|
||||||
$sql .= "where dialplan_uuid = '$dialplan_uuid' ";
|
$sql .= "where dialplan_uuid = '$dialplan_uuid' ";
|
||||||
|
|||||||
Reference in New Issue
Block a user