1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

remove unneded query

This commit is contained in:
Kaffeemon 2012-04-10 23:47:15 +02:00
parent 83dcbe9014
commit 8d05dfcd2b

View File

@ -36,14 +36,10 @@ public function readMessages() {
$this->messages = chat\message\ChatMessageList::getMessagesSince($this->room, \wcf\util\ChatUtil::readUserData('lastSeen'));
// update last seen message
$sql = "SELECT
max(messageID) as 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']));
if (count($this->messages)) {
$lastSeen = $this->messages[count($this->messages)-1]->messageID;
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => $lastSeen));
}
}
public function readRoom() {