MyBB Community Forums

Full Version: Possible Post Datahandler Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I noticed this odd problem in 1.8.5 when I have a moderator tool set to close the thread, it does not close. It only happens when you use both "Close Thread" and "Add New Reply". This worked fine in 1.6.14. I started reversing the problem and I'm pretty sure these actions are reversed in inc\datahandlers\post.php. They seem correct in 1.6.14, but didn't examine to closely to see what changed.

Sorry if this has already been reported. I did a quick search and didn't see it anywhere.

I believe these two lines should be swapped.
$modoptions_update['closed'] = $closed = 0;
$modoptions_update['closed'] = $closed = 1;

// Close the thread.
if($modoptions['closethread'] == 1 && $thread['closed'] != 1)
{
$modoptions_update['closed'] = $closed = 0;
log_moderator_action($modlogdata, $lang->thread_closed);
}

// Open the thread.
if($modoptions['closethread'] != 1 && $thread['closed'] == 1)
{
$modoptions_update['closed'] = $closed = 1;
log_moderator_action($modlogdata, $lang->thread_opened);
}
It's a known issue.
Alright, thank you. Wanted to pass it along just in case.