LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid) WHERE thread.keywords IS NULL ORDER BY threadid ASC LIMIT " . $vbulletin->GPC['startat'] . ", " . $vbulletin->GPC['perpage'] . " "); while ($thread = $db->fetch_array($threads)) { $gotsome = true; $threadinfo = fetch_threadinfo($thread['threadid']); if (!$threadinfo) { $finishat++; continue; } $keywords = fetch_keywords_list($threadinfo, $thread['firstpost']); $threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_SILENT, 'threadpost'); $threadman->set_existing($threadinfo); $threadman->set('keywords', $keywords); $threadman->save(); unset($threadman); echo construct_phrase($vbphrase['processing_x'], $thread['threadid'])."<br />\n"; vbflush(); } if ($gotsome) {
function rebuild_keywords() { require_once DIR . '/includes/functions_newpost.php'; $threadinfo = array('taglist' => $this->fetch_field('taglist'), 'prefixid' => $this->fetch_field('prefixid'), 'title' => $this->fetch_field('title')); $keywords = fetch_keywords_list($threadinfo, empty($this->info['pagetext']) ? $this->fetch_field('pagetext', 'post') : $this->info['pagetext']); $this->set('keywords', $keywords); }