MyBB Community Forums

Full Version: Deleting a Forum from ACP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I've been playing around with 1.6 and when you delete a forum from the ACP Forum Management area, the posts are left in limbo, they're not assigned to any forum and cannot be seen or managed without accessing the db (as far as I can tell).

Wouldn't it be better to either delete all the posts contained in the forum as well (notifying the user) or force/allow the user to move all of those posts to another forum?
Last time I checked there was code to delete everything from those forums...
I haven't looked at the code, but in the ACP, it simply pops up an "Are you sure?" box and then deletes the forum, rendering all the threads and post useless.
Yes, but when you delete the forum, it also deletes what's in it.

$db->delete_query("threads", "fid='{$fid}' {$delquery}");
$db->delete_query("posts", "fid='{$fid}' {$delquery}");
$db->delete_query("moderators", "fid='{$fid}' {$delquery}");
$db->delete_query("forumsubscriptions", "fid='{$fid}' {$delquery}");
Hmm, it appears that the counters in the Stats are are wrong. Ok, so the posts are deleted but the counters don't reflect that.

It still says the forum has 5 posts, when it has none. Is this a cache problem?
Go ACP > Tools & Maintenance > Recount & Rebuild and run Recount Statistics, Rebuild Forum Counters and Rebuild Thread Counters.
Yeh that works of course, but I couldn't see anything that does it automatically? I would have thought it would be part of a scheduled task?

Maybe I'm missing something...
I think this is a bug...
Has this been reported on the dev site? Or could a developer cast some light?
Pages: 1 2