From c16ac554e4d1de7f45106f0740cc685e8a95f392 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 16 May 2017 17:57:16 -0600 Subject: [PATCH] Update call_flow_edit.php --- app/call_flows/call_flow_edit.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/call_flows/call_flow_edit.php b/app/call_flows/call_flow_edit.php index ab18967409..3ffdac0002 100644 --- a/app/call_flows/call_flow_edit.php +++ b/app/call_flows/call_flow_edit.php @@ -88,12 +88,6 @@ $alternate_destination_array = explode(":", $call_flow_alternate_destination); $call_flow_alternate_app = array_shift($alternate_destination_array); $call_flow_alternate_data = join(':', $alternate_destination_array); - - - //set the context for users that are not in the superadmin group - if (!if_group("superadmin")) { - $call_flow_context = $_SESSION['domain_name']; - } } //process the user data and save it to the database @@ -158,6 +152,11 @@ $_POST["dialplan_uuid"] = $dialplan_uuid; } + //set the context for users that are not in the superadmin group + if (!if_group("superadmin")) { + $call_flow_context = $_SESSION['domain_name']; + } + //escape special characters $destination_extension = $call_flow_extension; $destination_extension = str_replace("*", "\*", $destination_extension); @@ -185,7 +184,7 @@ $dialplan["dialplan_uuid"] = $dialplan_uuid; $dialplan["dialplan_name"] = $call_flow_name; $dialplan["dialplan_number"] = $call_flow_extension; - $dialplan["dialplan_context"] = $_SESSION['context']; + $dialplan["dialplan_context"] = $call_flow_context; $dialplan["dialplan_continue"] = "false"; $dialplan["dialplan_xml"] = $dialplan_xml; $dialplan["dialplan_order"] = "333";