Bug #602

Merging posts doesn't update forum post counter

Added by Nick Palmer over 2 years ago. Updated about 2 years ago.

Status:Closed Start date:12/19/2009
Priority:Normal Due date:
Assignee:Huji Lee % Done:

100%

Category:Moderation
Target version:1.6.0 Beta
Reproducibility:Always Database Type:
Reported In MyBB Version:1.4.10 Database Version:
PHP Version: SQA assignments:
Browser:

Description

When you merge a post, the forum post count isn't updated.

Reproduction instructions
1) Create a new empty forum
2) Make a thread with one reply
3) Make a thread with two replies (Forum Post Count should now be 5)
4) Merge two replies

Forum count is set at 5 still, when it should be 4.

Board stats also affected, and if you delete the threads, you will end up with 0 threads and X amount of posts.


Related issues

related to MyBB - Bug #758: Wrong number on index if merge a accepted posting with a ... Closed 02/15/2010
related to MyBB - Bug #786: Merging posts form differnt threads Closed 03/03/2010

Associated revisions

Revision 4791
Added by Huji Lee about 2 years ago

WIP Merging posts form differnt threads (wip:786)
Fixes Merging posts doesn't update forum post counter (fixes:602)

Revision 4796
Added by Huji Lee about 2 years ago

Fixes Merging posts doesn't update forum post counter (fixes:602)
Improves r4791

History

#1 Updated by Ryan Gordon over 2 years ago

Your repro instructions aren't clear enough. Don't the threads in steps 3 and 4 have to go into separate forums?

#2 Updated by Nick Palmer over 2 years ago

Let me try and clarify.

Reproduction instructions
1) Create a new empty forum
2) Make a thread with one reply
3) Make a thread with two replies (Forum Post Count should now be 5)
4) Merge the two replies you just created together from step 3 (Forum Post count should be 4, since you just merged two posts together).

#3 Updated by Huji Lee over 2 years ago

  • Subject changed from Merge Posts to Merging posts doesn't update forum post counter

#4 Updated by Huji Lee over 2 years ago

  • Category set to Moderation
  • Assignee set to Huji Lee
  • Target version set to 1.4.12

#5 Updated by Huji Lee over 2 years ago

  • Status changed from Confirmed to Assigned

#6 Updated by Huji Lee about 2 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

With the changes applied in changeset r4791, the forum post counter is updated correctly when merging posts from the same thread.

Updating stats for merging posts from different threads is not complete yet.

#7 Updated by Ryan Gordon about 2 years ago

Looks like you just introduced an SQL Injection vulnerability because you did not sanitize $p

#8 Updated by Huji Lee about 2 years ago

Corrected in changeset r4796.

#9 Updated by Huji Lee about 2 years ago

  • Target version changed from 1.4.12 to 1.6.0 Beta

#10 Updated by Stefan T. about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF