Unreported: SQL Error for guests, displaying global announcements (Unknown column 't.forum_id' in 'where clause' - SELECT forum_id FROM phpbb_forums WHERE forum_type = 1 AND (t.forum_id = 0 OR (t.forum_id <> 3)) ORDER BY forum_id LIMIT 1), need to get the TOPICS_TABLE into the check too
This commit is contained in:
@@ -151,14 +151,13 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
|||||||
if( $type == 'announcements' && $global_f < 1 )
|
if( $type == 'announcements' && $global_f < 1 )
|
||||||
{
|
{
|
||||||
$sql = 'SELECT
|
$sql = 'SELECT
|
||||||
forum_id
|
f.forum_id
|
||||||
FROM
|
FROM ' . FORUMS_TABLE . ' f, ' . TOPICS_TABLE . ' t
|
||||||
' . FORUMS_TABLE . '
|
|
||||||
WHERE
|
WHERE
|
||||||
forum_type = ' . FORUM_POST . '
|
f.forum_type = ' . FORUM_POST . '
|
||||||
' . $str_where . '
|
' . $str_where . '
|
||||||
ORDER BY
|
ORDER BY
|
||||||
forum_id';
|
f.forum_id';
|
||||||
$result = $db->sql_query_limit($sql, 1);
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
|
||||||
if ($db->sql_affectedrows() > 0)
|
if ($db->sql_affectedrows() > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user