mirror of
https://github.com/Mibew/design.git
synced 2025-01-22 18:10:33 +03:00
Added some string related to threads error to localization
This commit is contained in:
parent
96c4727be2
commit
1f4582ab20
@ -682,13 +682,14 @@ function take_thread($thread, $operator)
|
||||
$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName, $thread['agentName']), $thread['locale']);
|
||||
}
|
||||
} else {
|
||||
die("cannot take thread");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($message_to_post) {
|
||||
post_message($threadid, $kind_events, $message_to_post);
|
||||
post_message($threadid, $kind_avatar, $operator['vcavatar'] ? $operator['vcavatar'] : "");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function check_for_reassign($thread, $operator)
|
||||
|
@ -542,6 +542,11 @@ tag.pagination.no_items=Found 0 elements
|
||||
tag.pagination.previous=previous
|
||||
thread.back_to_search=Go to search
|
||||
thread.chat_log=Chat log
|
||||
thread.error.cannot_take=Cannot take thread
|
||||
thread.error.cannot_take_over=Cannot take over
|
||||
thread.error.cannot_view=Cannot view threads
|
||||
thread.error.old_browser=Old browser is used, please update it
|
||||
thread.error.wrong_thread=Wrong thread
|
||||
thread.intro=This page displays chat details and content.
|
||||
time.dateformat=%B %d, %Y
|
||||
time.locale=en_US
|
||||
|
@ -540,6 +540,11 @@ tag.pagination.no_items=
|
||||
tag.pagination.previous=ïðåäûäóùàÿ
|
||||
thread.back_to_search=Ïåðåéòè â ïîèñê
|
||||
thread.chat_log=Ïðîòîêîë ðàçãîâîðà
|
||||
thread.error.cannot_take=Невозможно установить диалог
|
||||
thread.error.cannot_take_over=Вы не можете перехватывать диалоги
|
||||
thread.error.cannot_view=Вы не можете просматривать диалоги
|
||||
thread.error.old_browser=Вы используете устаревший браузер, пожалуйста, обновите его
|
||||
thread.error.wrong_thread=Диалог не существует
|
||||
thread.intro=Íà äàííîé ñòðàíèöå Âû ìîæåòå ïðîñìîòðåòü äèàëîã.
|
||||
time.dateformat=%d %B %Y,
|
||||
time.locale=ru_RU.UTF-8
|
||||
|
@ -48,12 +48,18 @@ if (!isset($_GET['token'])) {
|
||||
|
||||
$remote_level = get_remote_level($_SERVER['HTTP_USER_AGENT']);
|
||||
if ($remote_level != "ajaxed") {
|
||||
die("old browser is used, please update it");
|
||||
$errors = array(getlocal("thread.error.old_browser"));
|
||||
start_html_output();
|
||||
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||
exit;
|
||||
}
|
||||
|
||||
$thread = thread_by_id($threadid);
|
||||
if (!$thread || !isset($thread['ltoken'])) {
|
||||
die("wrong thread");
|
||||
$errors = array(getlocal("thread.error.wrong_thread"));
|
||||
start_html_output();
|
||||
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||
exit;
|
||||
}
|
||||
|
||||
$viewonly = verifyparam("viewonly", "/^true$/", false);
|
||||
@ -62,7 +68,7 @@ if (!isset($_GET['token'])) {
|
||||
if (!$viewonly && $thread['istate'] == $state_chatting && $operator['operatorid'] != $thread['agentId']) {
|
||||
|
||||
if (!is_capable($can_takeover, $operator)) {
|
||||
$errors = array("Cannot take over");
|
||||
$errors = array(getlocal("thread.error.cannot_take_over"));
|
||||
start_html_output();
|
||||
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||
exit;
|
||||
@ -79,9 +85,14 @@ if (!isset($_GET['token'])) {
|
||||
}
|
||||
|
||||
if (!$viewonly) {
|
||||
take_thread($thread, $operator);
|
||||
if(! take_thread($thread, $operator)){
|
||||
$errors = array(getlocal("thread.error.cannot_take"));
|
||||
start_html_output();
|
||||
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||
exit;
|
||||
}
|
||||
} else if (!is_capable($can_viewthreads, $operator)) {
|
||||
$errors = array("Cannot view threads");
|
||||
$errors = array(getlocal("thread.error.cannot_view"));
|
||||
start_html_output();
|
||||
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user