1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

[ticket/16138] Use same variable for forum_id in one query

PHPBB3-16138
This commit is contained in:
Marc Alexander 2021-05-24 16:20:13 +02:00
parent 3f518c9263
commit c925e8ef58
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -146,7 +146,7 @@ if ($view && !$post_id)
WHERE forum_id = ' . $forum_id . "
AND topic_moved_id = 0
AND topic_last_post_time $sql_condition {$row['topic_last_post_time']}
AND " . $phpbb_content_visibility->get_visibility_sql('topic', $row['forum_id']) . "
AND " . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id) . "
ORDER BY topic_last_post_time $sql_ordering, topic_last_post_id $sql_ordering";
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);