diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 11:56:05 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 11:56:05 +0200 |
commit | dc2f13d55d181c1a927b6daa8652f68ee87b4a90 (patch) | |
tree | 632de73cca9d65cf1e33c00fbd1df0e034a5fdab | |
parent | cdb13fc7be4771bc89da624fe0b5f38b0cc3ccd1 (diff) | |
download | forums-dc2f13d55d181c1a927b6daa8652f68ee87b4a90.tar forums-dc2f13d55d181c1a927b6daa8652f68ee87b4a90.tar.gz forums-dc2f13d55d181c1a927b6daa8652f68ee87b4a90.tar.bz2 forums-dc2f13d55d181c1a927b6daa8652f68ee87b4a90.tar.xz forums-dc2f13d55d181c1a927b6daa8652f68ee87b4a90.zip |
[ticket/9657] Cast topic_id to integer
PHPBB3-9657
-rw-r--r-- | phpBB/includes/content_visibility.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/content_visibility.php b/phpBB/includes/content_visibility.php index 88f57a0020..f4126d0fff 100644 --- a/phpBB/includes/content_visibility.php +++ b/phpBB/includes/content_visibility.php @@ -565,7 +565,7 @@ class phpbb_content_visibility { $sql = 'SELECT topic_type, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_visibility FROM ' . TOPICS_TABLE . ' - WHERE topic_id = ' . $topic_id; + WHERE topic_id = ' . (int) $topic_id; $result = $db->sql_query($sql); $topic_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -583,7 +583,7 @@ class phpbb_content_visibility // Get user post count information $sql = 'SELECT poster_id, COUNT(post_id) AS num_posts FROM ' . POSTS_TABLE . ' - WHERE topic_id = ' . $topic_id . ' + WHERE topic_id = ' . (int) $topic_id . ' AND post_postcount = 1 AND post_visibility = ' . ITEM_APPROVED . ' GROUP BY poster_id'; |