Fixed Member ability to delete posts should check thread open vs closed

TJ Adams

Member
The ability for members to edit posts is disabled once a thread is closed.

However, members can delete posts in those same closed threads.

Code-wise, ./library/XenForo/Model/Post.php has a check for thread closure in function canEditPost(), right after checking that it is not a guest viewing. check uses: if (!$thread['discussion_open'])...

I think that same if-block check should be placed in function canDeletePost(), in same relative position there.

Logic: Why prevent members from editing posts, but, not prevent them from deleting posts in closed threads? How is deletion less of an issue than editing, once a thread is closed?

Please consider.
 
I can't really think of a reasonable use case where editing would be disabled but deleting not -- you can still report and have a moderator deal with it, of course. When a thread is locked, the content itself should generally be locked.

As such, I'm changing this as part of 1.4. Good catch. :)
 
Top Bottom