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

sync('topic') relies on post_id instead of post_time.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 3.0.4
    • 3.2.2-RC1
    • ACP
    • None

    Description

      As per title.

      As far as I know phpBB is supposed to support things like adding posts to a topic with a lower timestamp than the last post (i.e. adding posts between two other posts in the topic). For example a modification might do that.

      While viewtopic etc. order fine by post_time instead of post_id, it looks like the sync() function doesn't take into account that the lowest post_id does not necessarily need to be the topic's first_post_id.

      Some snippets ...

      $sql = 'SELECT t.topic_id, t.post_approved, COUNT(t.post_id) AS total_posts, MIN(t.post_id) AS first_post_id, MAX(t.post_id) AS last_post_id

      $topic_data[$topic_id]['first_post_id'] = (!$topic_data[$topic_id]['first_post_id']) ? $row['first_post_id'] : min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']); 

      Attachments

        Issue Links

          Activity

            People

              CHItA CHItA
              bantu Andreas Fischer [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: