From 4a9e1cb1e47c17820e8c556d54dbd385521d48c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 18 Jan 2012 21:18:03 +0100 Subject: [PATCH 1/2] Fixing problem with empty newestMessages --- file/lib/page/ChatPage.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php index 9656430..7c21fbd 100644 --- a/file/lib/page/ChatPage.class.php +++ b/file/lib/page/ChatPage.class.php @@ -67,7 +67,7 @@ public function readData() { $this->userData['color'] = \wcf\util\ChatUtil::readUserData('color'); \wcf\util\ChatUtil::writeUserData(array('roomID' => $this->room->roomID)); $this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES); - \wcf\util\ChatUtil::writeUserData(array('lastSeen' => end($this->newestMessages)->messageID)); + \wcf\util\ChatUtil::writeUserData(array('lastSeen' => count($this->newestMessages) ? end($this->newestMessages)->messageID : 0)); if (CHAT_DISPLAY_JOIN_LEAVE) { $messageAction = new chat\message\ChatMessageAction(array(), 'create', array( From 62c572e1e75a2f14a60b2da55d0b24517bad9523 Mon Sep 17 00:00:00 2001 From: max-m Date: Wed, 18 Jan 2012 21:42:24 +0100 Subject: [PATCH 2/2] Added copyright ID and linked my GitHub profile ^^ --- template/chatCopyright.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/chatCopyright.tpl b/template/chatCopyright.tpl index 06fc5cf..bd7e0a6 100644 --- a/template/chatCopyright.tpl +++ b/template/chatCopyright.tpl @@ -1,7 +1,7 @@ -{if $templateName == 'chat'} +{if $templateName == 'chat'} {elseif $templateName == 'chatCopyright'}
Project-Leader
-
Developer
+
Developer
Graphics
  • Tom
Translation
  • Riccardo Vianello (it)
Thanks