diff --git a/app/call_center/call_center_queue_edit.php b/app/call_center/call_center_queue_edit.php
index 93d826acc4..d4db490f3e 100644
--- a/app/call_center/call_center_queue_edit.php
+++ b/app/call_center/call_center_queue_edit.php
@@ -98,7 +98,7 @@ else {
from
v_call_center_tiers
where
- domain_uuid = '".$domain_uuid."' and
+ domain_uuid = '".$_SESSION['domain_uuid']."' and
call_center_tier_uuid = '".$tier_uuid."'
";
$prep_statement = $db->prepare(check_sql($sql));
@@ -111,19 +111,19 @@ else {
}
unset ($prep_statement);
//delete the agent from freeswitch
- //get the domain using the $domain_uuid
- $tmp_domain = $_SESSION['domains'][$domain_uuid]['domain_name'];
+ //get the domain using the $_SESSION['domain_uuid']
+ $tmp_domain = $_SESSION['domains'][$_SESSION['domain_uuid']]['domain_name'];
//setup the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//delete the agent over event socket
if ($fp) {
//callcenter_config tier del [queue_name] [agent_name]
- $cmd = "api callcenter_config tier del ".$queue_name."@".$tmp_domain." ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name'];
+ $cmd = "api callcenter_config tier del ".$queue_name."@".$tmp_domain." ".$agent_name."@".$_SESSION['domains'][$_SESSION['domain_uuid']]['domain_name'];
$response = event_socket_request($fp, $cmd);
}
//delete the tier from the database
if (strlen($tier_uuid)>0) {
- $sql = "delete from v_call_center_tiers where domain_uuid = '".$domain_uuid."' and call_center_tier_uuid = '".$tier_uuid."'";
+ $sql = "delete from v_call_center_tiers where domain_uuid = '".$_SESSION['domain_uuid']."' and call_center_tier_uuid = '".$tier_uuid."'";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
unset($sql);
@@ -138,7 +138,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
//check for all required data
- if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid
\n"; }
+ //if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid
\n"; }
if (strlen($queue_name) == 0) { $msg .= $text['message-required'].$text['label-queue_name']."
\n"; }
if (strlen($queue_extension) == 0) { $msg .= $text['message-required'].$text['label-extension']."
\n"; }
if (strlen($queue_strategy) == 0) { $msg .= $text['message-required'].$text['label-strategy']."
\n"; }
@@ -206,7 +206,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= ")";
$sql .= "values ";
$sql .= "(";
- $sql .= "'$domain_uuid', ";
+ $sql .= "'".$_SESSION['domain_uuid']."', ";
$sql .= "'$call_center_queue_uuid', ";
$sql .= "'$queue_name', ";
$sql .= "'$queue_extension', ";
@@ -274,7 +274,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "queue_announce_frequency = '$queue_announce_frequency', ";
}
$sql .= "queue_description = '$queue_description' ";
- $sql .= "where domain_uuid = '$domain_uuid' ";
+ $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and call_center_queue_uuid = '$call_center_queue_uuid'";
$db->exec(check_sql($sql));
unset($sql);
@@ -338,7 +338,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= ")";
$sql .= "values ";
$sql .= "(";
- $sql .= "'$domain_uuid', ";
+ $sql .= "'".$_SESSION['domain_uuid']."', ";
$sql .= "'$call_center_tier_uuid', ";
$sql .= "'$agent_name', ";
$sql .= "'$queue_name', ";
@@ -363,7 +363,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
$call_center_queue_uuid = $_GET["id"];
$sql = "select * from v_call_center_queues ";
- $sql .= "where domain_uuid = '$domain_uuid' ";
+ $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and call_center_queue_uuid = '$call_center_queue_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
@@ -537,7 +537,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "\n";
if (permission_exists('call_center_tier_view')) {
-
echo "