IVR Menu - fix add and update message

This commit is contained in:
FusionPBX 2019-09-05 07:34:01 -06:00 committed by GitHub
parent b60b0832c3
commit 5abdab9386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@
// moved to functions.php
//action add or update
if (is_uuid($_REQUEST["id"])) {
if (is_uuid($_REQUEST["id"]) || is_uuid($_REQUEST["ivr_menu_uuid"])) {
$action = "update";
$ivr_menu_uuid = $_REQUEST["id"];
if (is_uuid($_REQUEST["ivr_menu_uuid"])) {
@ -231,7 +231,7 @@
}
//add a uuid to ivr_menu_uuid if it is empty
if ($action = 'add') {
if ($action == 'add') {
$_POST["ivr_menu_uuid"] = $ivr_menu_uuid;
}
@ -292,10 +292,10 @@
//add the dialplan permission
$p = new permissions;
if ($action = "add") {
if ($action == "add") {
$p->add("dialplan_add", "temp");
}
else if ($action = "update") {
else if ($action == "update") {
$p->add("dialplan_edit", "temp");
}
@ -307,7 +307,7 @@
$database->uuid($ivr_menu_uuid);
}
$database->save($array);
$message = $database->message;
//$message = $database->message;
//remove the temporary permission
$p->delete("dialplan_add", "temp");
@ -340,7 +340,7 @@
}
//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;
} //if ($_POST["persistformvar"] != "true")