From 3f39164db1d22c3443f6632c7c3c59cba940b58e Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Thu, 11 Oct 2012 13:35:11 +0000 Subject: [PATCH] Fix bug with message about user rename --- src/messenger/webim/libs/classes/thread.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/messenger/webim/libs/classes/thread.php b/src/messenger/webim/libs/classes/thread.php index b1d3480e..8d659ac2 100644 --- a/src/messenger/webim/libs/classes/thread.php +++ b/src/messenger/webim/libs/classes/thread.php @@ -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);