mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/9657] Cast topic_id to integer
PHPBB3-9657
This commit is contained in:
parent
cdb13fc7be
commit
dc2f13d55d
1 changed files with 2 additions and 2 deletions
|
@ -565,7 +565,7 @@ class phpbb_content_visibility
|
||||||
{
|
{
|
||||||
$sql = 'SELECT topic_type, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_visibility
|
$sql = 'SELECT topic_type, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_visibility
|
||||||
FROM ' . TOPICS_TABLE . '
|
FROM ' . TOPICS_TABLE . '
|
||||||
WHERE topic_id = ' . $topic_id;
|
WHERE topic_id = ' . (int) $topic_id;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$topic_row = $db->sql_fetchrow($result);
|
$topic_row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
@ -583,7 +583,7 @@ class phpbb_content_visibility
|
||||||
// Get user post count information
|
// Get user post count information
|
||||||
$sql = 'SELECT poster_id, COUNT(post_id) AS num_posts
|
$sql = 'SELECT poster_id, COUNT(post_id) AS num_posts
|
||||||
FROM ' . POSTS_TABLE . '
|
FROM ' . POSTS_TABLE . '
|
||||||
WHERE topic_id = ' . $topic_id . '
|
WHERE topic_id = ' . (int) $topic_id . '
|
||||||
AND post_postcount = 1
|
AND post_postcount = 1
|
||||||
AND post_visibility = ' . ITEM_APPROVED . '
|
AND post_visibility = ' . ITEM_APPROVED . '
|
||||||
GROUP BY poster_id';
|
GROUP BY poster_id';
|
||||||
|
|
Loading…
Add table
Reference in a new issue