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

Useless parameter $data['post_time'] in function submit_post.

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.7-PL1
    • Fix Version/s: 3.0.8-RC1
    • Component/s: Posting
    • Labels:
      None

      Description

      In submit_post $data['post_time'] is used to mark the forum read (line 2540) but when inserting into the db, $current_time (time()) is used.

      Either $data['post_time'] should be removed or better yet support setting the post time using $data['post_time'] instead of forcing time()

        Issue Links

          Activity

          Hide
          A_Jelly_Doughnut A_Jelly_Doughnut added a comment -

          The fix would be to remove $data['post_time']. To a high level of confidence, I think phpBB's read tracking can't handle arbitrary post times.

          rxu, can you confirm that?

          Show
          A_Jelly_Doughnut A_Jelly_Doughnut added a comment - The fix would be to remove $data ['post_time'] . To a high level of confidence, I think phpBB's read tracking can't handle arbitrary post times. rxu, can you confirm that?
          Hide
          rxu Ruslan Uzdenov added a comment -

          I think phpBB's read tracking can't handle arbitrary post times.

          rxu, can you confirm that?

          Yes, the read tracking only handles last posts' time values.

          In submit_post $data['post_time'] is used to mark the forum read (line 2540)

          In reality, the one that's used on line 2540 is for "dotted topics" tracking (the topics user posted in), not for read tracking
          A topic is going to be marked as read on line #2545 where time() is used.

          Show
          rxu Ruslan Uzdenov added a comment - I think phpBB's read tracking can't handle arbitrary post times. rxu, can you confirm that? Yes, the read tracking only handles last posts' time values. In submit_post $data ['post_time'] is used to mark the forum read (line 2540) In reality, the one that's used on line 2540 is for "dotted topics" tracking (the topics user posted in), not for read tracking A topic is going to be marked as read on line #2545 where time() is used.
          Hide
          nickvergessen Joas Schilling added a comment -

          As the function did never support posting to another time than time() I'd go and remove that. The one line can be changed and just remove the last parameter as it's not needed in the function anyway.

          Show
          nickvergessen Joas Schilling added a comment - As the function did never support posting to another time than time() I'd go and remove that. The one line can be changed and just remove the last parameter as it's not needed in the function anyway.

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              EXreaction EXreaction [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development