From 4616cdb066304031adef41ab56a132870ebaea89 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 30 Jul 2009 13:47:27 +0000 Subject: Fix bug #48885, introduced in r9843 Authorised by: kellanved git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9893 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index e348694cfe..543472ad4e 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1553,8 +1553,8 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) { $sql = 'SELECT 1 AS has_attachments FROM ' . ATTACHMENTS_TABLE . ' - WHERE ' . $db->sql_in_set('topic_id', $topic_ids); - $result = $db->sql_query($sql); + WHERE topic_id = ' . $topic_id; + $result = $db->sql_query_limit($sql, 1); $has_attachments = (int) $db->sql_fetchfield('has_attachments'); $db->sql_freeresult($result); -- cgit v1.2.1