1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-09 00:20:08 +00:00

Optimize ChatMessagePage

This commit is contained in:
Tim Düsterhus 2012-11-23 20:33:27 +01:00
parent 8e07b7f2b7
commit 2f6354acdb

View File

@ -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
));
}