diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 901b2ed95f..bc2867731c 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -97,7 +97,7 @@ $ring_group_name = check_str($_POST["ring_group_name"]); $ring_group_extension = check_str($_POST["ring_group_extension"]); $ring_group_greeting = check_str($_POST["ring_group_greeting"]); - $ring_group_context = check_str($_POST["ring_group_context"]); + $ring_group_strategy = check_str($_POST["ring_group_strategy"]); $ring_group_timeout_action = check_str($_POST["ring_group_timeout_action"]); $ring_group_call_timeout = check_str($_POST["ring_group_call_timeout"]); @@ -112,6 +112,7 @@ $ring_group_forward_enabled = check_str($_POST["ring_group_forward_enabled"]); $ring_group_forward_destination = check_str($_POST["ring_group_forward_destination"]); $ring_group_forward_toll_allow = check_str($_POST["ring_group_forward_toll_allow"]); + $ring_group_context = check_str($_POST["ring_group_context"]); $ring_group_enabled = check_str($_POST["ring_group_enabled"]); $ring_group_description = check_str($_POST["ring_group_description"]); $dialplan_uuid = check_str($_POST["dialplan_uuid"]); @@ -125,7 +126,7 @@ $destination_prompt = check_str($_POST["destination_prompt"]); //set the context for users that are not in the superadmin group - if (!if_group("superadmin")) { + if (!permission_exists("ring_group_context")) { $ring_group_context = $_SESSION['domain_name']; } } @@ -456,8 +457,8 @@ //set defaults if (strlen($ring_group_enabled) == 0) { $ring_group_enabled = 'true'; } -//set the context for users that are not in the superadmin group - if (strlen($ring_group_context) == 0) { +//set the context for users that do not have the permission + if (!permission_exists('ring_group_context') { $ring_group_context = $_SESSION['domain_name']; } @@ -847,7 +848,7 @@ echo "\n"; } - if (if_group("superadmin")) { + if (permission_exists("ring_group_context")) { echo "\n"; echo "\n"; echo " ".$text['label-context']."\n";