When functions_posting.php runs update_forum_tracking_info() after a new post, it doesn't exclude unapproved topics. This creates problems. Imagine this sequence:
- user 1 marks all forums read (just to make this simple to follow )
- user 2 posts a new topic in forum A and that topic has to be approved before user 1 can see it
- user 1 posts a new post or reply in forum A (before anyone else posts again)...that triggers update_forum_tracking_info()
- since user 1 has read all approved topics in the forum, update_forum_tracking() is supposed to mark the forum read
- but instead, update_forum_tracking_info incorrectly concludes that there still are unread posts (because the topic last post time for the unapproved topic is greater than the relevant mark time) and therefore does NOT reset the mark time for the forum
- user 1 then goes to the index and it tells him that forum A is if unread (because user 1's own last post has a post time greater than the relevant mark time for forum 1).
Here's a fix: