Fix the ring group message for add or update.
This commit is contained in:
@@ -77,9 +77,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//action add or update
|
//action add or update
|
||||||
if (is_uuid($_REQUEST["id"])) {
|
if (is_uuid($_REQUEST["id"]) || is_uuid($_REQUEST["ring_group_uuid"])) {
|
||||||
$action = "update";
|
$action = "update";
|
||||||
$ring_group_uuid = $_REQUEST["id"];
|
$ring_group_uuid = $_REQUEST["id"];
|
||||||
|
if (is_uuid($_REQUEST["ring_group_uuid"])) {
|
||||||
|
$ring_group_uuid = $_REQUEST["ring_group_uuid"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$action = "add";
|
$action = "add";
|
||||||
@@ -146,12 +149,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//assign the user to the ring group
|
//assign the user to the ring group
|
||||||
if (
|
if (is_uuid($_REQUEST["user_uuid"]) && is_uuid($_REQUEST["id"]) && $_GET["a"] != "delete" && permission_exists("ring_group_edit")) {
|
||||||
is_uuid($_REQUEST["user_uuid"])
|
|
||||||
&& is_uuid($_REQUEST["id"])
|
|
||||||
&& $_GET["a"] != "delete"
|
|
||||||
&& permission_exists("ring_group_edit")
|
|
||||||
) {
|
|
||||||
//set the variables
|
//set the variables
|
||||||
$user_uuid = $_REQUEST["user_uuid"];
|
$user_uuid = $_REQUEST["user_uuid"];
|
||||||
$extension_uuid = $_REQUEST["id"];
|
$extension_uuid = $_REQUEST["id"];
|
||||||
@@ -181,11 +179,6 @@
|
|||||||
//process the HTTP POST
|
//process the HTTP POST
|
||||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
|
|
||||||
//get the ring group uuid
|
|
||||||
if ($action = 'add') {
|
|
||||||
$_POST["ring_group_uuid"] = $ring_group_uuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
//check for all required data
|
//check for all required data
|
||||||
$msg = '';
|
$msg = '';
|
||||||
if (strlen($ring_group_name) == 0) { $msg .= $text['message-name']."<br>\n"; }
|
if (strlen($ring_group_name) == 0) { $msg .= $text['message-name']."<br>\n"; }
|
||||||
@@ -369,7 +362,7 @@
|
|||||||
//save the message to a session variable
|
//save the message to a session variable
|
||||||
message::add($text['message-add']);
|
message::add($text['message-add']);
|
||||||
//redirect the browser
|
//redirect the browser
|
||||||
header("Location: ring_group_edit.php?id=$ring_group_uuid");
|
header("Location: ring_group_edit.php?id=".urlencode($ring_group_uuid));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if ($action == "update") {
|
if ($action == "update") {
|
||||||
|
|||||||
Reference in New Issue
Block a user