web: fix thread being marked as unread after posting to it (fix #506)

svn path=/trunk/boinc/; revision=15796
This commit is contained in:
Rytis Slatkevičius 2008-08-09 19:27:17 +00:00
parent 539f8b31b2
commit 92e3e07e0c
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

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