Fixed dynamic destinations when switching domains
This commit is contained in:
parent
14e3cf5546
commit
c285a104f0
|
|
@ -457,12 +457,12 @@ if (!class_exists('destinations')) {
|
|||
|
||||
//get the destinations
|
||||
$destination = new destinations;
|
||||
if (!isset($_SESSION['destinations']['array'][$destination_type])) {
|
||||
$_SESSION['destinations']['array'][$destination_type] = $destination->get($destination_type);
|
||||
if (!isset($_SESSION['destinations'][$this->domain_uuid]['array'][$destination_type])) {
|
||||
$_SESSION['destinations'][$this->domain_uuid]['array'][$destination_type] = $destination->get($destination_type);
|
||||
}
|
||||
|
||||
//get the destination label
|
||||
foreach($_SESSION['destinations']['array'][$destination_type] as $key => $value) {
|
||||
foreach($_SESSION['destinations'][$this->domain_uuid]['array'][$destination_type] as $key => $value) {
|
||||
foreach($value as $k => $row) {
|
||||
if ($destination_value == $row['destination']) {
|
||||
$destination_key = $key;
|
||||
|
|
@ -478,7 +478,7 @@ if (!class_exists('destinations')) {
|
|||
//build the destination select list in html
|
||||
$response .= " <select id='{$destination_id}_type' class='formfld' style='".$select_style."' onchange=\"get_destinations('".$destination_id."', '".$destination_type."', this.value);\">\n";
|
||||
$response .= " <option value=''></option>\n";
|
||||
foreach($_SESSION['destinations']['array'][$destination_type] as $key => $value) {
|
||||
foreach($_SESSION['destinations'][$this->domain_uuid]['array'][$destination_type] as $key => $value) {
|
||||
$singular = $this->singular($key);
|
||||
if (permission_exists("{$singular}_destinations")) {
|
||||
//determine if selected
|
||||
|
|
@ -499,7 +499,7 @@ if (!class_exists('destinations')) {
|
|||
}
|
||||
$response .= " </select>\n";
|
||||
$response .= " <select id='".$destination_id."' name='".$destination_name."' class='formfld' style='".$select_style."'>\n";
|
||||
foreach($_SESSION['destinations']['array'][$destination_type] as $key => $value) {
|
||||
foreach($_SESSION['destinations'][$this->domain_uuid]['array'][$destination_type] as $key => $value) {
|
||||
if ($key == $destination_key) {
|
||||
foreach($value as $k => $row) {
|
||||
$selected = ($row['destination'] == $destination_value) ? "selected='selected'" : '';
|
||||
|
|
@ -1088,8 +1088,8 @@ if (!class_exists('destinations')) {
|
|||
}
|
||||
|
||||
//clear the destinations session array
|
||||
if (isset($_SESSION['destinations']['array'])) {
|
||||
unset($_SESSION['destinations']['array']);
|
||||
if (isset($_SESSION['destinations'][$this->domain_uuid]['array'])) {
|
||||
unset($_SESSION['destinations'][$this->domain_uuid]['array']);
|
||||
}
|
||||
|
||||
//set message
|
||||
|
|
@ -1154,4 +1154,4 @@ echo $obj->select('ivr', 'example5', '');
|
|||
echo $obj->select('ivr', 'example6', '');
|
||||
*/
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue