MyBB Community Forums

Full Version: Run Recount & Rebuild function from custom page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am working on a custom plugin for a client which also includes moving a thread to a specific forum. The problem here is that the stats and last post don't get updated automatically, theĀ Rebuild Forum Counters function (Recount & Rebuild) in the ACP seems to fix this problem.

I am moving this thread on a custom page.

$tid = (int)$mybb->input['tid'];

// Move thread
$db->update_query('threads', array('fid' => $mybb->settings['app_forum']), 'tid = ' . $tid);

This works completely fine, how can I run the function on this custom page? Thank you in advance.
you're probably looking for class_moderation :: move_thread() or similar
(2018-10-12, 02:32 PM)frostschutz Wrote: [ -> ]you're probably looking for class_moderation :: move_thread() or similar

This solved my issue, thanks.