diff --git a/checkin_notes b/checkin_notes index 8dde8ad342..ddd2878bac 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4895,7 +4895,7 @@ Charlie 12 July 2012 BuildMacWrapper.sh David 12 July 2012 - - web: make "jump to first unread" for with pagination + - web: make "jump to first unread" work with pagination html/ inc/ @@ -4911,3 +4911,9 @@ David 12 July 2012 forum.inc user/ forum_thread.php + +David 12 July 2012 + - web: don't try to update thread last-read-time if not logged in + + html/inc/ + forum.inc diff --git a/html/inc/forum.inc b/html/inc/forum.inc index bb78d4b0e8..02e906415f 100644 --- a/html/inc/forum.inc +++ b/html/inc/forum.inc @@ -401,7 +401,7 @@ function show_posts( $headings = array(array(tra("Author"),"authorcol"), array(tra("Message"),"")); start_forum_table($headings, "id=\"thread\" cellspacing=0"); - $latest_post_shown = 0; + $latest_shown_timestamp = 0; foreach ($posts as $post) { if ($num_skipped < $start) { $num_skipped++; @@ -416,8 +416,8 @@ function show_posts( ); $n = ($n+1)%2; - if ($post->timestamp > $latest_post_shown) { - $latest_post_shown = $post->timestamp; + if ($post->timestamp > $latest_shown_timestamp) { + $latest_shown_timestamp = $post->timestamp; } $num_shown++; } @@ -430,10 +430,12 @@ function show_posts( echo ""; } - if (!$forum_log || $latest_post_shown > $forum_log->timestamp) { - BoincForumLogging::replace( - $logged_in_user->id, $thread->id, $latest_post_shown - ); + if ($logged_in_user) { + if (!$forum_log || $latest_shown_timestamp > $forum_log->timestamp) { + BoincForumLogging::replace( + $logged_in_user->id, $thread->id, $latest_shown_timestamp + ); + } } }