Use 'chat.user.name' var instead of 'ct.user.name' in templates

This commit is contained in:
Dmitriy Simushev 2013-02-18 13:16:51 +00:00
parent fead1b65a1
commit 9cde3262d6
2 changed files with 4 additions and 4 deletions

View File

@ -356,7 +356,7 @@ function setup_chatview_for_user(Thread $thread, $level) {
$data['user'] = true;
$data['canpost'] = true;
$data['level'] = $level;
$data['ct.user.name'] = htmlspecialchars(topage($thread->userName));
$data['chat.user.name'] = htmlspecialchars(topage($thread->userName));
$data['canChangeName'] = Settings::get('usercanchangename') == "1";
$params = "thread=" . $thread->id . "&token=" . $thread->lastToken;
@ -391,7 +391,7 @@ function setup_chatview_for_operator(Thread $thread, $operator) {
$data['agent'] = true;
$data['user'] = false;
$data['canpost'] = $thread->agentId == $operator['operatorid'];
$data['ct.user.name'] = htmlspecialchars(topage(get_user_name($thread->userName, $thread->remote, $thread->userId)));
$data['chat.user.name'] = htmlspecialchars(topage(get_user_name($thread->userName, $thread->remote, $thread->userId)));
// Set SSL link
if (Settings::get('enablessl') == "1" && !is_secure_request()) {

View File

@ -66,9 +66,9 @@
chatModule: {
user: {
${if:user}
name: "${page:ct.user.name}",
name: "${page:chat.user.name}",
canChangeName: ${if:canChangeName}true${else:canChangeName}false${endif:canChangeName},
defaultName: ("${page:ct.user.name}" == "${msg:chat.default.username}"),
defaultName: ("${page:chat.user.name}" == "${msg:chat.default.username}"),
${endif:user}
canPost: ${if:canpost}true${else:canpost}false${endif:canpost},
isAgent: ${if:agent}true${else:agent}false${endif:agent}