From 92e3e07e0cbec0db4fee7e022e1cb680997d0c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Sat, 9 Aug 2008 19:27:17 +0000 Subject: [PATCH] web: fix thread being marked as unread after posting to it (fix #506) svn path=/trunk/boinc/; revision=15796 --- checkin_notes | 6 ++++++ html/inc/forum.inc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index f6efc9dd72..6fb15ee69c 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6378,3 +6378,9 @@ David 9 Aug 2008 cs_prefs.C html/inc/ forum.inc + +Rytis 9 Aug 2008 + - web: fix thread being marked as unread after posting to it (fix #506) + + html/inc/ + forum.inc diff --git a/html/inc/forum.inc b/html/inc/forum.inc index edaf68e0dc..0f2b2551b2 100644 --- a/html/inc/forum.inc +++ b/html/inc/forum.inc @@ -271,9 +271,9 @@ function thread_last_visit($user, $thread) { function thread_is_unread($user, $thread) { if (!$user) return false; - if ($thread->timestamp < $user->prefs->mark_as_read_timestamp) return false; + if ($thread->timestamp <= $user->prefs->mark_as_read_timestamp) return false; $log = BoincForumLogging::lookup($user->id, $thread->id); - if ($log && ($thread->timestamp < $log->timestamp)) return false; + if ($log && ($thread->timestamp <= $log->timestamp)) return false; return true; }