diff --git a/app/call_centers/app_languages.php b/app/call_centers/app_languages.php index 023d06178f..8a8ca6ed71 100644 --- a/app/call_centers/app_languages.php +++ b/app/call_centers/app_languages.php @@ -960,6 +960,30 @@ $text['message-duplicate_agent_id']['zh-cn'] = "检测到重复的代理 ID"; $text['message-duplicate_agent_id']['ja-jp'] = "重複するエージェント ID が検出されました"; $text['message-duplicate_agent_id']['ko-kr'] = "중복 상담원 ID 감지됨"; +$text['message-status_set']['en-us'] = "Status Set"; +$text['message-status_set']['en-gb'] = "Status Set"; +$text['message-status_set']['ar-eg'] = "مجموعة الحالة"; +$text['message-status_set']['de-at'] = "Statussatz"; +$text['message-status_set']['de-ch'] = "Statussatz"; +$text['message-status_set']['de-de'] = "Statussatz"; +$text['message-status_set']['es-cl'] = "Conjunto de estado"; +$text['message-status_set']['es-mx'] = "Conjunto de estado"; +$text['message-status_set']['fr-ca'] = "Statut défini"; +$text['message-status_set']['fr-fr'] = "Statut défini"; +$text['message-status_set']['he-il'] = "סטטוס סטטוס"; +$text['message-status_set']['it-it'] = "Stato impostato"; +$text['message-status_set']['nl-nl'] = "Status ingesteld"; +$text['message-status_set']['pl-pl'] = "Zestaw statusu"; +$text['message-status_set']['pt-br'] = "Conjunto de status"; +$text['message-status_set']['pt-pt'] = "Conjunto de status"; +$text['message-status_set']['ro-ro'] = "Set de stare"; +$text['message-status_set']['ru-ru'] = "Статус установлен"; +$text['message-status_set']['sv-se'] = "Status Set"; +$text['message-status_set']['uk-ua'] = "Набір статусу"; +$text['message-status_set']['zh-cn'] = "状态集"; +$text['message-status_set']['ja-jp'] = "ステータスセット"; +$text['message-status_set']['ko-kr'] = "상태 설정"; + $text['label-wrap_up_time']['en-us'] = "Wrap Up Time"; $text['label-wrap_up_time']['en-gb'] = "Wrap Up Time"; $text['label-wrap_up_time']['ar-eg'] = "وقت الختام"; diff --git a/app/call_centers/call_center_agent_status.php b/app/call_centers/call_center_agent_status.php index 8912a63db5..95e04856c6 100644 --- a/app/call_centers/call_center_agent_status.php +++ b/app/call_centers/call_center_agent_status.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2023 the Initial Developer. All Rights Reserved. Contributor(s): @@ -154,7 +154,7 @@ } //remove rows from the http post array where the status has not changed - if (is_array($_POST['agents']) && !$per_queue_login) { + if (!empty($_POST['agents']) && is_array($_POST['agents']) && !$per_queue_login) { foreach($_POST['agents'] as $key => $row) { foreach($agents as $k => $field) { if ($field['agent_name'] === $row['agent_name'] && $field['agent_status'] === $row['agent_status']) { @@ -165,14 +165,14 @@ } //use the http post array to change the status - if (is_array($_POST['agents'])) { + if (!empty($_POST['agents']) && is_array($_POST['agents'])) { foreach($_POST['agents'] as $row) { if (isset($row['agent_status'])) { //agent set status if ($fp) { //set the user_status if (!isset($row['queue_name'])) { - $array['users'][0]['user_uuid'] = $row['user_uuid']; + $array['users'][0]['user_uuid'] = $row['user_uuid'] ?? null; $array['users'][0]['user_status'] = $row['agent_status']; $array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; @@ -291,11 +291,15 @@ } //foreach //send a message - message::add($text['confirm-add']); + message::add($text['message-status_set']); header("Location: call_center_agent_status.php"); return; } //post +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + //includes the header $document['title'] = $text['title-call_center_agent_status']; require_once "resources/header.php"; @@ -332,7 +336,7 @@ echo "
\n"; echo "\n"; - if (is_array($_POST['agents']) && !$per_queue_login) { + if (!empty($_POST['agents']) && is_array($_POST['agents']) && !$per_queue_login) { echo $text['description-call_center_agent_status']."\n"; echo "

\n"; } @@ -431,4 +435,4 @@ //show the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file