diff --git a/app/bridges/bridge_edit.php b/app/bridges/bridge_edit.php index a3e2b89218..49f2a7483d 100644 --- a/app/bridges/bridge_edit.php +++ b/app/bridges/bridge_edit.php @@ -124,6 +124,11 @@ $database->save($array); $message = $database->message; + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //redirect the user if (isset($action)) { if ($action == "add") { diff --git a/app/bridges/resources/classes/bridges.php b/app/bridges/resources/classes/bridges.php index 5254fe7d7b..f7797092e6 100644 --- a/app/bridges/resources/classes/bridges.php +++ b/app/bridges/resources/classes/bridges.php @@ -106,6 +106,11 @@ if (!class_exists('bridges')) { $database->delete($array); unset($array); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //set message message::add($text['message-delete']); } @@ -174,6 +179,11 @@ if (!class_exists('bridges')) { $database->save($array); unset($array); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //set message message::add($text['message-toggle']); } diff --git a/app/call_centers/call_center_queue_edit.php b/app/call_centers/call_center_queue_edit.php index 9d0a64eaf0..7889f1032f 100644 --- a/app/call_centers/call_center_queue_edit.php +++ b/app/call_centers/call_center_queue_edit.php @@ -379,6 +379,11 @@ $cache = new cache; $cache->delete("dialplan:".$_SESSION["domain_name"]); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //redirect the user if (isset($action)) { if ($action == "add") { diff --git a/app/call_centers/resources/classes/call_center.php b/app/call_centers/resources/classes/call_center.php index 4f62248265..bd9887cce9 100644 --- a/app/call_centers/resources/classes/call_center.php +++ b/app/call_centers/resources/classes/call_center.php @@ -369,6 +369,11 @@ $cache->delete("dialplan:".$_SESSION["domain_name"]); remove_config_from_cache('configuration:callcenter.conf'); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //synchronize configuration save_call_center_xml(); diff --git a/app/call_flows/call_flow_edit.php b/app/call_flows/call_flow_edit.php index c507527df7..d7b4cc6f21 100644 --- a/app/call_flows/call_flow_edit.php +++ b/app/call_flows/call_flow_edit.php @@ -255,6 +255,11 @@ $cache = new cache; $cache->delete("dialplan:".$call_flow_context); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //redirect the user if (isset($action)) { if ($action == "add") { diff --git a/app/call_flows/resources/classes/call_flows.php b/app/call_flows/resources/classes/call_flows.php index 2bb4d87647..cff8c934f0 100644 --- a/app/call_flows/resources/classes/call_flows.php +++ b/app/call_flows/resources/classes/call_flows.php @@ -158,6 +158,11 @@ if (!class_exists('call_flows')) { } } + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //set message message::add($text['message-delete']); } @@ -250,6 +255,11 @@ if (!class_exists('call_flows')) { } } + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //set message message::add($text['message-toggle']); } diff --git a/app/conference_centers/conference_center_edit.php b/app/conference_centers/conference_center_edit.php index 468910f612..fe8b29769e 100644 --- a/app/conference_centers/conference_center_edit.php +++ b/app/conference_centers/conference_center_edit.php @@ -185,6 +185,11 @@ $cache = new cache; $cache->delete("dialplan:".$_SESSION["domain_name"]); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //redirect the user if (isset($action)) { if ($action == "add") { diff --git a/app/conference_centers/resources/classes/conference_centers.php b/app/conference_centers/resources/classes/conference_centers.php index 7943fc08ef..ed6b316039 100644 --- a/app/conference_centers/resources/classes/conference_centers.php +++ b/app/conference_centers/resources/classes/conference_centers.php @@ -375,6 +375,11 @@ if (!class_exists('conference_centers')) { $cache = new cache; $cache->delete("dialplan:".$_SESSION["domain_name"]); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //apply settings reminder $_SESSION["reload_xml"] = true; @@ -606,6 +611,11 @@ if (!class_exists('conference_centers')) { $cache = new cache; $cache->delete("dialplan:".$_SESSION["domain_name"]); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //set message message::add($text['message-toggle']); diff --git a/app/conferences/conference_edit.php b/app/conferences/conference_edit.php index c87d4ea371..0e12346361 100644 --- a/app/conferences/conference_edit.php +++ b/app/conferences/conference_edit.php @@ -243,6 +243,11 @@ $cache = new cache; $cache->delete("dialplan:".$_SESSION["domain_name"]); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //redirect the browser header("Location: conferences.php"); exit; diff --git a/app/conferences/resources/classes/conferences.php b/app/conferences/resources/classes/conferences.php index 570ee92dca..38ce49cd9e 100644 --- a/app/conferences/resources/classes/conferences.php +++ b/app/conferences/resources/classes/conferences.php @@ -143,6 +143,11 @@ if (!class_exists('conferences')) { $cache = new cache; $cache->delete("dialplan:".$_SESSION["domain_name"]); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //set message message::add($text['message-delete']); @@ -229,6 +234,11 @@ if (!class_exists('conferences')) { $cache = new cache; $cache->delete("dialplan:".$_SESSION["domain_name"]); + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //set message message::add($text['message-toggle']); } diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index f103dd8812..4521f445b3 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -457,13 +457,12 @@ if (!class_exists('destinations')) { //get the destinations $destination = new destinations; - if (!isset($_SESSION['destinations'][$destination_type])) { - unset($_SESSION['destinations'][$destination_type]); - $_SESSION['destinations'][$destination_type] = $destination->get($destination_type); + if (!isset($_SESSION['destinations']['array'][$destination_type])) { + $_SESSION['destinations']['array'][$destination_type] = $destination->get($destination_type); } //get the destination label - foreach($_SESSION['destinations'][$destination_type] as $key => $value) { + foreach($_SESSION['destinations']['array'][$destination_type] as $key => $value) { foreach($value as $k => $row) { if ($destination_value == $row['destination']) { $destination_key = $key; @@ -479,7 +478,7 @@ if (!class_exists('destinations')) { //build the destination select list in html $response .= " \n"; $response .= "