From bb50e76463ca166a9e78800903d1e1f56d5d036d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 27 Dec 2011 14:09:29 +0100 Subject: [PATCH] Change username on error-type as well --- file/lib/data/chat/message/ChatMessage.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/file/lib/data/chat/message/ChatMessage.class.php b/file/lib/data/chat/message/ChatMessage.class.php index 544a5f0..1af64a8 100755 --- a/file/lib/data/chat/message/ChatMessage.class.php +++ b/file/lib/data/chat/message/ChatMessage.class.php @@ -72,7 +72,7 @@ public function getFormattedMessage() { public function getFormattedUsername() { $username = $this->getUsername(); - if ($this->type != self::TYPE_INFORMATION) $username = \wcf\util\ChatUtil::gradient($username, $this->color1, $this->color2); + if ($this->type != self::TYPE_INFORMATION && $this->type != self::TYPE_ERROR) $username = \wcf\util\ChatUtil::gradient($username, $this->color1, $this->color2); return ''.$username.''; } @@ -84,6 +84,8 @@ public function getFormattedUsername() { */ public function getUsername() { if ($this->type == self::TYPE_INFORMATION) return WCF::getLanguage()->get('wcf.chat.information'); + if ($this->type == self::ERROR) return WCF::getLanguage()->get('wcf.chat.error'); + return $this->username; }