1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-15 13:34:41 +01:00

ok, these should fix the unread tracking bugs (yeah, actually two of them). Watch out for any oddities if you directly link to posts... :o

git-svn-id: file:///svn/phpbb/trunk@7257 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-04-01 16:01:39 +00:00
parent 5828a9a85b
commit 3fa29da47d

View File

@ -271,7 +271,7 @@ if ($post_id)
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$topic_data['prev_posts'] = $row['prev_posts'];
$topic_data['prev_posts'] = $row['prev_posts'] + 1;
}
}
@ -1490,8 +1490,8 @@ if (isset($user->data['session_page']) && strpos($user->data['session_page'], '&
}
}
// Only mark topic if it's currently unread
if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id])
// Only mark topic if it's currently unread. Also make sure we do not set topic tracking back if earlier pages are viewed.
if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id] && $max_post_time > $topic_tracking_info[$topic_id])
{
markread('topic', $forum_id, $topic_id, $max_post_time);