From c13c5182ac00cc188e98cf7f53eb748e40b9eac8 Mon Sep 17 00:00:00 2001 From: fusionate Date: Mon, 30 Nov 2020 15:53:44 -0700 Subject: [PATCH] Destination Select - Dynamic: Clear session array for Outbound Destinations. --- app/destinations/destination_edit.php | 6 ++++++ app/destinations/resources/classes/destinations.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 77d92ccd5b..afdd179e16 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -745,6 +745,12 @@ $database->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139'; $database->save($array); $dialplan_response = $database->message; + + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + } //redirect the user diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index 4521f445b3..7f52f0587a 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -1063,6 +1063,11 @@ if (!class_exists('destinations')) { } } + //clear the destinations session array + if (isset($_SESSION['destinations']['array'])) { + unset($_SESSION['destinations']['array']); + } + //set message message::add($text['message-delete']);