Fix bug with message about user rename

This commit is contained in:
Dmitriy Simushev 2012-10-11 13:35:11 +00:00
parent 4102ce00f3
commit 3f39164db1

View File

@ -847,6 +847,8 @@ Class Thread {
public function renameUser($new_name) {
// Rename only if a new name is realy new
if ($this->userName != $new_name) {
// Save old name
$old_name = $this->userName;
// Rename user
$this->userName = $new_name;
$this->save();
@ -854,7 +856,7 @@ Class Thread {
// Send message about renaming
$message = getstring2_(
"chat.status.user.changedname",
array($this->userName, $new_name),
array($old_name, $new_name),
$this->locale
);
$this->postMessage(self::KIND_EVENTS, $message);