MyBB Community Forums

Full Version: [F] SMF 1.1.7 - Incorrect forum list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In SMF 1.1.7, importing forums will sometimes result in an incorrect forum list. The following piece of code is the problem.

(from the import forums function in the smf.php module)
if($forum['ID_PARENT'])
{
	$this->import_fids_f[$insert_forum['import_fid']] = $fid;
}
else
{				
	$this->import_fids_c[$insert_forum['import_fid']] = $fid;
}

Because SMF splits categories and forums into two separate tables, we import them separately as well; categories first, then forums.

So when we import forums we check ID_PARENT to see if it is a child of a forum or a category. At the end we then have to update our internal caches with the piece of code above.

However, the logic in that code is wrong. We will ALWAYS be importing forums in that module so updating the category cache array can result in incorrect collisions and a bad forum list.

All we need is simply:
$this->import_fids_f[$insert_forum['import_fid']] = $fid;
This bug has been fixed in the latest version of the MyBB Merge System.

Please note the latest code is not live on the site or for download. An update for the MyBB Merge System will be released which contains this fix.

With regards,
The MyBB Group