Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-8440

unread flags improperly handled in forums where posts need approval

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 3.0.5
    • 3.2.2-RC1
    • Viewing forums
    • None
    • PHP Environment:
      Database:

    Description

      Imagine the following:

      • a poster posts a new reply in a forum that requires posts to be approved
      • after that post, a regular user reads the topic in which that reply was posted (the user can't read that reply since it has not yet been approved)
      • because the regular user has just read that topic, the topic is now treated as 'read' by the user (and if that was the only unread topic in the forum, the forum is now treated as 'read' by the user)
      • the moderator than approves the post so everyone can read it
      • the regular user goes back to the site and if no one else has posted in the topic the topic still appears to be 'read' even though the user has never read that last post that just got approved (and if all other topics in the forum are read the forum appears to be 'read' even though it includes a post the user has not read)

      And of course the same thing happens if a poster posts a new topic that needs to be approved (a regular user who reads an unread post in the same forum after the poster posts the new topic but before it is approved will see the forum as read when the new topic gets approved even if he has never read that new topic.

      This is somewhat related to the bug reported here but is a bit more general: http://www.phpbb.com/bugs/phpbb3/23605

      This happens because the phpbb3 code that tracks unreads uses a post's post time (or a topic's last post time) rather than the time of approval to figure out which posts (or topics) are unread. A relatively easy fix would be to add a column to the posts table called 'approval_time' (and a new column to the topics table called 'last_post_approval_time')that would be set for a post and topic each time a moderator approves the post. The code that checks for unreads (e.g. the newposts code in search or the relevant code in includes/functions_display.php) would then check for that time rather than post_time or last_post_time. If the developers want me to suggest some code please let me know.

      Attachments

        Issue Links

          Activity

            People

              rxu rxu
              asinshesq asinshesq [X] (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: