From 812ce1d5d4ae7d58bfd78d8d4aa782241b8f562d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 10 Dec 2011 18:05:21 +0100 Subject: [PATCH] Check some of our options --- file/lib/page/ChatPage.class.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php index 4ac3e3d..460aca4 100644 --- a/file/lib/page/ChatPage.class.php +++ b/file/lib/page/ChatPage.class.php @@ -69,21 +69,23 @@ public function readData() { $this->readRoom(); $this->readUserData(); - $this->joinMessage = chat\message\ChatMessageEditor::create(array( - 'roomID' => $this->room->roomID, - 'sender' => WCF::getUser()->userID, - 'username' => WCF::getUser()->username, - 'time' => TIME_NOW, - 'type' => chat\message\ChatMessage::TYPE_JOIN, - 'message' => '', - 'color1' => $this->userData['color'][1], - 'color2' => $this->userData['color'][2] - )); + if (CHAT_DISPLAY_JOIN_LEAVE) { + $this->joinMessage = chat\message\ChatMessageEditor::create(array( + 'roomID' => $this->room->roomID, + 'sender' => WCF::getUser()->userID, + 'username' => WCF::getUser()->username, + 'time' => TIME_NOW, + 'type' => chat\message\ChatMessage::TYPE_JOIN, + 'message' => '', + 'color1' => $this->userData['color'][1], + 'color2' => $this->userData['color'][2] + )); + } $this->readDefaultSmileys(); $this->readChatVersion(); - $this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, 5); + $this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES); } /**