diff options
Diffstat (limited to 'phpBB/download/file.php')
-rw-r--r-- | phpBB/download/file.php | 4 |
1 files 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 { |