MyBB Community Forums

Full Version: Mod CP SQL Errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2012-09-06, 11:16 PM)Omar G. Wrote: [ -> ]Open modscp.php, find:
if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
	$flist .= " AND fid NOT IN ({$unviewableforums})";
	$tflist .= " AND t.fid NOT IN ({$unviewableforums})";

	$unviewableforums = str_replace("'", '', $unviewableforums);
	$unviewableforums = explode(',', $unviewableforums);
}

Repace:
if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
	if(is_array($unviewableforums))
	{
		$flist = implode(',', $unviewableforums);
	}

	$flist .= " AND fid NOT IN ({$unviewableforums})";
	$tflist .= " AND t.fid NOT IN ({$unviewableforums})";

	$unviewableforums = str_replace("'", '', $unviewableforums);
	$unviewableforums = explode(',', $unviewableforums);
}

Tested, the error still be there Rolleyes
My bad, try to test it again please.
(2012-09-07, 05:38 AM)Omar G. Wrote: [ -> ]My bad, try to test it again please.

Did you edit the replace code in previous page? So I can try again.
(2012-09-06, 11:16 PM)Omar G. Wrote: [ -> ]Open modscp.php, find:
if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
	$flist .= " AND fid NOT IN ({$unviewableforums})";
	$tflist .= " AND t.fid NOT IN ({$unviewableforums})";

	$unviewableforums = str_replace("'", '', $unviewableforums);
	$unviewableforums = explode(',', $unviewableforums);
}

Repace:
if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
	if(is_array($unviewableforums))
	{
		$unviewableforums = str_replace("'", '', implode(',', $unviewableforums));
	}

	$flist .= " AND fid NOT IN ({$unviewableforums})";
	$tflist .= " AND t.fid NOT IN ({$unviewableforums})";

	$unviewableforums = str_replace("'", '', $unviewableforums);
	$unviewableforums = explode(',', $unviewableforums);
}

Works, thanks!

(2012-09-07, 06:24 AM)NNT_ Wrote: [ -> ]
(2012-09-07, 05:38 AM)Omar G. Wrote: [ -> ]My bad, try to test it again please.

Did you edit the replace code in previous page? So I can try again.

Yes, he did.
Yes, I edited my post to avoid future confusions. Glad it worked, though, please note that this doesn't track what the error is to fix it, it may be considered just as a workaround.
(2012-09-07, 07:30 AM)Omar G. Wrote: [ -> ]Yes, I edited my post to avoid future confusions. Glad it worked, though, please note that this doesn't track what the error is to fix it, it may be considered just as a workaround.

This work like a charm. Thanks you so much, dude Smile
(2012-09-07, 07:30 AM)Omar G. Wrote: [ -> ]Yes, I edited my post to avoid future confusions. Glad it worked, though, please note that this doesn't track what the error is to fix it, it may be considered just as a workaround.

I see. Do you think that there will be a fix in 1.6.9?
Quote:Do you think that there will be a fix in 1.6.9?

I wouldn't say so, since nobody has been able to track down what the issue is, it seems to happen just in some boards under unknown circumstances.

If you think you have found what the problem is, and you know the process to reproduce it, feel free to fill a report at the bug tracker.
Pages: 1 2