diff --git a/app/bridges/bridge_edit.php b/app/bridges/bridge_edit.php
index a3e2b8921..49f2a7483 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 5254fe7d7..f7797092e 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 9d0a64eaf..7889f1032 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 4f6224826..bd9887cce 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 c507527df..d7b4cc6f2 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 2bb4d8764..cff8c934f 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 468910f61..fe8b29769 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 7943fc08e..ed6b31603 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 c87d4ea37..0e1234636 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 570ee92dc..38ce49cd9 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 f103dd881..4521f445b 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 .= "