aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-08-10 02:28:07 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-08-10 02:36:38 +0200
commit93f630e9b18ec1540654a371f0214ab50b271998 (patch)
tree16ed4255ea9d03eb080addbdd83a4263ffbb05a1 /phpBB/download
parent0226bc43dd2048bb2d90e55c3036b53e50d2288b (diff)
downloadforums-93f630e9b18ec1540654a371f0214ab50b271998.tar
forums-93f630e9b18ec1540654a371f0214ab50b271998.tar.gz
forums-93f630e9b18ec1540654a371f0214ab50b271998.tar.bz2
forums-93f630e9b18ec1540654a371f0214ab50b271998.tar.xz
forums-93f630e9b18ec1540654a371f0214ab50b271998.zip
[feature/attach-dl] Do not fetch orphaned attachments when downloading archives
PHPBB3-11042
Diffstat (limited to 'phpBB/download')
-rw-r--r--phpBB/download/file.php4
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
{