diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-08-07 02:10:15 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-08-07 02:10:15 +0200 |
commit | 60d382df4c9ce50447b07abf04ed97a6319b14b0 (patch) | |
tree | fe52ef8559121da03d02631f9b046f05a98bb959 | |
parent | 87c822b79448bf375bc76c383d7d9a3606074b19 (diff) | |
download | forums-60d382df4c9ce50447b07abf04ed97a6319b14b0.tar forums-60d382df4c9ce50447b07abf04ed97a6319b14b0.tar.gz forums-60d382df4c9ce50447b07abf04ed97a6319b14b0.tar.bz2 forums-60d382df4c9ce50447b07abf04ed97a6319b14b0.tar.xz forums-60d382df4c9ce50447b07abf04ed97a6319b14b0.zip |
[feature/attach-dl] Putting some old code under "else if ($download_id)".
PHPBB3-11042
-rw-r--r-- | phpBB/download/file.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 75ff708b16..4f6bc6738c 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -193,13 +193,19 @@ if (empty($attachments)) } else if ($download_id) { + // sizeof($attachments) == 1 $attachment = current($attachments); -} -if ($attachment && ((!$attachment['in_message'] && !$config['allow_attachments']) || ($attachment['in_message'] && !$config['allow_pm_attach']))) + // in_message = 1 means it's in a private message + if (!$attachment['in_message'] && !$config['allow_attachments'] || $attachment['in_message'] && !$config['allow_pm_attach']) + { + send_status_line(404, 'Not Found'); + trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED'); + } +} +else { - send_status_line(404, 'Not Found'); - trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED'); + // sizeof($attachments) > 1 } $row = array(); |