diff options
Diffstat (limited to 'phpBB/download/file.php')
-rw-r--r-- | phpBB/download/file.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index bd96ad02f7..bddd6a27aa 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -145,12 +145,6 @@ $user->session_begin(false); $auth->acl($user->data); $user->setup('viewtopic'); -if (!$download_id && !$post_id && !$topic_id) -{ - send_status_line(404, 'Not Found'); - trigger_error('NO_ATTACHMENT_SELECTED'); -} - if (!$config['allow_attachments'] && !$config['allow_pm_attach']) { send_status_line(404, 'Not Found'); @@ -193,6 +187,11 @@ else if ($topic_id) $attachments = $db->sql_fetchrowset($result); $db->sql_freeresult($result); } +else +{ + send_status_line(404, 'Not Found'); + trigger_error('NO_ATTACHMENT_SELECTED'); +} if (!$attachment && !$attachments) { |