mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-01 03:54:56 +02:00
[feature/attach-dl] Exploit the "if ... else if ..." for the error message.
Use an "else" statement instead of checking everything at the top. PHPBB3-11042
This commit is contained in:
parent
862502aacd
commit
5986676f4d
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user