From 93f630e9b18ec1540654a371f0214ab50b271998 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 10 Aug 2012 02:28:07 +0200 Subject: [PATCH] [feature/attach-dl] Do not fetch orphaned attachments when downloading archives PHPBB3-11042 --- phpBB/download/file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/download/file.php b/phpBB/download/file.php index d31c33b781..e0e7e48f69 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -159,12 +159,12 @@ if ($download_id) else if ($post_id) { // Post id or private message id (multiple attachments) - $sql_where = "post_msg_id = $post_id"; + $sql_where = "post_msg_id = $post_id AND is_orphan = 0"; } else if ($topic_id) { // Topic id (multiple attachments) - $sql_where = "topic_id = $topic_id"; + $sql_where = "topic_id = $topic_id AND is_orphan = 0"; } else {