mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-19 08:01:27 +02:00
[feature/attach-dl] Move !download_allowed() check up.
PHPBB3-11042
This commit is contained in:
@@ -191,6 +191,11 @@ if (empty($attachments))
|
|||||||
send_status_line(404, 'Not Found');
|
send_status_line(404, 'Not Found');
|
||||||
trigger_error('ERROR_NO_ATTACHMENT');
|
trigger_error('ERROR_NO_ATTACHMENT');
|
||||||
}
|
}
|
||||||
|
else if (!download_allowed())
|
||||||
|
{
|
||||||
|
send_status_line(403, 'Forbidden');
|
||||||
|
trigger_error($user->lang['LINKAGE_FORBIDDEN']);
|
||||||
|
}
|
||||||
else if ($download_id)
|
else if ($download_id)
|
||||||
{
|
{
|
||||||
// sizeof($attachments) == 1
|
// 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)
|
if ($attachments && sizeof($attachments) < 2)
|
||||||
{
|
{
|
||||||
$attachments = false;
|
$attachments = false;
|
||||||
|
Reference in New Issue
Block a user