aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/download/file.php')
-rw-r--r--phpBB/download/file.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index 67f315dd2f..23e8327a22 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -191,6 +191,11 @@ if (empty($attachments))
send_status_line(404, 'Not Found');
trigger_error('ERROR_NO_ATTACHMENT');
}
+else if (!download_allowed())
+{
+ send_status_line(403, 'Forbidden');
+ trigger_error($user->lang['LINKAGE_FORBIDDEN']);
+}
else if ($download_id)
{
// sizeof($attachments) == 1
@@ -335,12 +340,6 @@ else
}
}
-if (!download_allowed())
-{
- send_status_line(403, 'Forbidden');
- trigger_error($user->lang['LINKAGE_FORBIDDEN']);
-}
-
if ($attachments && sizeof($attachments) < 2)
{
$attachments = false;