From a3bdeba53c63af62a2cdb04fda1fc71d0d85dfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 27 Apr 2012 20:16:58 +0200 Subject: [PATCH] Ensure the message is at least 10 seconds old Otherwise slower clients would get problems with two messages directly after each other --- file/lib/util/ChatUtil.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/file/lib/util/ChatUtil.class.php b/file/lib/util/ChatUtil.class.php index 72ac950..7d590e6 100644 --- a/file/lib/util/ChatUtil.class.php +++ b/file/lib/util/ChatUtil.class.php @@ -50,10 +50,12 @@ public static function getDiedUsers() { time FROM wcf".WCF_N."_chat_message + WHERE + time < ? ORDER BY messageID DESC"; $stmt = WCF::getDB()->prepareStatement($sql, 1, 1); - $stmt->execute(); + $stmt->execute(array(TIME_NOW - 10)); $time = $stmt->fetchColumn(); } else {