2009-01-01, 02:44 PM
Hi developers,
xeniun (MyBBoard.it) found this bug, printthread.php doesn't show unapproved posts also if you have enough permissions.
This is also easily fixable.
Find:
Replace with:
xeniun (MyBBoard.it) found this bug, printthread.php doesn't show unapproved posts also if you have enough permissions.
This is also easily fixable.
Find:
$query = $db->query("
SELECT u.*, u.username AS userusername, p.*
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.tid='$tid' AND p.visible=1
ORDER BY p.dateline
");
Replace with:
if(is_moderator($fid))
{
$visible = "AND (p.visible='0' OR p.visible='1')";
}
else
{
$visible = "AND p.visible='1'";
}
$query = $db->query("
SELECT u.*, u.username AS userusername, p.*
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.tid='$tid' {$visible}
ORDER BY p.dateline
");