1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-01 03:54:56 +02:00

[feature/attach-dl] Putting some old code under "else if ($download_id)".

PHPBB3-11042
This commit is contained in:
Andreas Fischer 2012-08-07 02:10:15 +02:00
parent 87c822b794
commit 60d382df4c

View File

@ -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();