Skip to content
Permalink
Browse files Browse the repository at this point in the history
Update dialplan_detail_edit.php
  • Loading branch information
markjcrane committed Nov 28, 2019
1 parent fe504b8 commit b584973
Showing 1 changed file with 32 additions and 23 deletions.
55 changes: 32 additions & 23 deletions app/dialplans/dialplan_detail_edit.php
Expand Up @@ -17,31 +17,35 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2013
Portions created by the Initial Developer are Copyright (C) 2008-2019
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('dialplan_add')
|| permission_exists('dialplan_edit')
|| permission_exists('inbound_route_add')
|| permission_exists('inbound_route_edit')
|| permission_exists('outbound_route_add')
|| permission_exists('outbound_route_edit')
|| permission_exists('fifo_edit')
|| permission_exists('fifo_add')
|| permission_exists('time_condition_add')
|| permission_exists('time_condition_edit')) {
//access granted
}
else {
echo "access denied";
exit;
}

//includes
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";

//check permisions
if (permission_exists('dialplan_add')
|| permission_exists('dialplan_edit')
|| permission_exists('inbound_route_add')
|| permission_exists('inbound_route_edit')
|| permission_exists('outbound_route_add')
|| permission_exists('outbound_route_edit')
|| permission_exists('fifo_edit')
|| permission_exists('fifo_add')
|| permission_exists('time_condition_add')
|| permission_exists('time_condition_edit')) {
//access granted
}
else {
echo "access denied";
exit;
}

//add multi-lingual support
$language = new text;
Expand All @@ -55,11 +59,9 @@
else {
$action = "add";
}
$dialplan_uuid = $_REQUEST["dialplan_uuid"];

//get the http values and set them as php variables
$app_uuid = $_REQUEST["app_uuid"];
if (count($_POST)>0) {
if (count($_POST) > 0) {
$dialplan_uuid = $_POST["dialplan_uuid"];
$dialplan_detail_tag = $_POST["dialplan_detail_tag"];
$dialplan_detail_order = $_POST["dialplan_detail_order"];
Expand All @@ -69,6 +71,12 @@
$dialplan_detail_inline = $_POST["dialplan_detail_inline"];
$dialplan_detail_group = $_POST["dialplan_detail_group"];
}
if (is_uuid($_REQUEST["app_uuid"])) {
$app_uuid = $_REQUEST["app_uuid"];
}
if (is_uuid($_REQUEST["dialplan_uuid"])) {
$dialplan_uuid = $_REQUEST["dialplan_uuid"];
}

if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {

Expand Down Expand Up @@ -491,4 +499,5 @@ function replace_param(obj){

//include the footer
require_once "resources/footer.php";

?>

0 comments on commit b584973

Please sign in to comment.