1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

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
This commit is contained in:
Joas Schilling
2009-07-30 13:47:27 +00:00
parent e1db7e08dc
commit 4616cdb066
2 changed files with 3 additions and 3 deletions

View File

@@ -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);