Minor change in the function names for accessing the db in 3.5.X:
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);
?>