From 2f6354acdbc053a761a1a8ba4c08657e574917b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 23 Nov 2012 20:33:27 +0100 Subject: [PATCH] Optimize ChatMessagePage --- file/lib/page/ChatMessagePage.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/file/lib/page/ChatMessagePage.class.php b/file/lib/page/ChatMessagePage.class.php index 97de2f7..f8d7150 100644 --- a/file/lib/page/ChatMessagePage.class.php +++ b/file/lib/page/ChatMessagePage.class.php @@ -116,15 +116,14 @@ public function readMessages() { // update last seen message $sql = "SELECT - MAX(messageID) as messageID + MAX(messageID) FROM wcf".WCF_N."_chat_message"; $stmt = WCF::getDB()->prepareStatement($sql); $stmt->execute(); - $row = $stmt->fetchArray(); \wcf\util\ChatUtil::writeUserData(array( - 'lastSeen' => $row['messageID'], + 'lastSeen' => $stmt->fetchColumn(), 'lastActivity' => TIME_NOW )); }