We're looking for a way to move all threads in Forum A with X replies to Forum B, and this chunk of code should work as a cron job for 3.6.x. However, I'd like to bring this back, as we really need to get this functional for 3.7.x. Would anyone mind helping fix the code so it will accomplish this task in 3.7.x?
PHP Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db))
{
exit;
}
$vbulletin->db->query("UPDATE " . TABLE_PREFIX . "thread SET forumid = 2 WHERE forumid = 17 AND replycount >= 1");
require_once(DIR . '/includes/functions_databuild.php');
build_forum_counters(2);
build_forum_counters(17);
log_cron_action('Threads with replies moved from 17 to 2', $nextitem);
?>
What changes should be made so that it will work in 3.7.x?