Quote:
Originally Posted by Greebo
Ok, the modification to editpost.php has a logic error in it.
You test two conditions in a nested double test:
Was post made anon?
- Yes
-- was it anon before?
---Yes set a bunch of vars incl $threadupdate
---No set a bunch of vars incl $threadupdate
- No
-- was it anon before?
---Yes set a bunch of vars incl $threadupdate
---No set a bunch of vars incl $threadupdate
Then you later have logic twice to update the thread
// if (!empty($threadupdate))
$threadupdate will never be empty in either case.
Net effect: When a thread is posted and someone replies to it and then edits their reply, thread.postusername and thread.postuserid are overwridden inappropriately and the 2nd threadupdate . Thread should only be updated with anon/real user names and IDs if the OP is edited.
[/php]
You will see, I wrapped all updates to $threadupdate in a conditional validating that the post edited is the first post in the thread.
I also removed "postuserid = $edit[userid]" in all spots in that code (it was in every update to $threadupdate).
|
I seemed to have the same problem. I pinpointed it to editpost.php, where whenever someone edits his post, he will appear as the thread originator. I constantly have to rebuild threads. I am going to try your fix.