IVR Menu - fix add and update message
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
// moved to functions.php
|
// moved to functions.php
|
||||||
|
|
||||||
//action add or update
|
//action add or update
|
||||||
if (is_uuid($_REQUEST["id"])) {
|
if (is_uuid($_REQUEST["id"]) || is_uuid($_REQUEST["ivr_menu_uuid"])) {
|
||||||
$action = "update";
|
$action = "update";
|
||||||
$ivr_menu_uuid = $_REQUEST["id"];
|
$ivr_menu_uuid = $_REQUEST["id"];
|
||||||
if (is_uuid($_REQUEST["ivr_menu_uuid"])) {
|
if (is_uuid($_REQUEST["ivr_menu_uuid"])) {
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//add a uuid to ivr_menu_uuid if it is empty
|
//add a uuid to ivr_menu_uuid if it is empty
|
||||||
if ($action = 'add') {
|
if ($action == 'add') {
|
||||||
$_POST["ivr_menu_uuid"] = $ivr_menu_uuid;
|
$_POST["ivr_menu_uuid"] = $ivr_menu_uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,10 +292,10 @@
|
|||||||
|
|
||||||
//add the dialplan permission
|
//add the dialplan permission
|
||||||
$p = new permissions;
|
$p = new permissions;
|
||||||
if ($action = "add") {
|
if ($action == "add") {
|
||||||
$p->add("dialplan_add", "temp");
|
$p->add("dialplan_add", "temp");
|
||||||
}
|
}
|
||||||
else if ($action = "update") {
|
else if ($action == "update") {
|
||||||
$p->add("dialplan_edit", "temp");
|
$p->add("dialplan_edit", "temp");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,7 +307,7 @@
|
|||||||
$database->uuid($ivr_menu_uuid);
|
$database->uuid($ivr_menu_uuid);
|
||||||
}
|
}
|
||||||
$database->save($array);
|
$database->save($array);
|
||||||
$message = $database->message;
|
//$message = $database->message;
|
||||||
|
|
||||||
//remove the temporary permission
|
//remove the temporary permission
|
||||||
$p->delete("dialplan_add", "temp");
|
$p->delete("dialplan_add", "temp");
|
||||||
@@ -340,7 +340,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//redirect the user
|
//redirect the user
|
||||||
header("Location: ivr_menu_edit.php?id=".escape($ivr_menu_uuid));
|
header("Location: ivr_menu_edit.php?id=".urlencode($ivr_menu_uuid));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} //if ($_POST["persistformvar"] != "true")
|
} //if ($_POST["persistformvar"] != "true")
|
||||||
|
|||||||
Reference in New Issue
Block a user