PHP Code:
function step_143()
{
/*
This step removes duff thread records that have no first postid.
These threads have no posts, so adding them would be pointless and cause issues down the line.
Exclude the threads with open == 10 which are thread redirects
*/
$query = "
DELETE FROM " . TABLE_PREFIX . "thread
WHERE firstpostid = 0 AND open 10
";
$this->run_query(
sprintf($this->phrase['vbphrase']['update_table'], 'thread'), $query
);
}
The code comment says "open == 10", but the actual query uses the '' or 'NOT equal to' operator.
The result is that almost 70k threads were deleted. These threads did not have any posts other than the starter, but they should not just be deleted from the upgraded forum.
We would like to confirm that the correct query should be "AND open = 10".
Devami...