[feature/attach-dl] phpbb_filter_disallowed_extensions: Preserve array keys.

PHPBB3-11042
This commit is contained in:
Andreas Fischer 2012-08-07 02:48:49 +02:00
parent bba348d68a
commit 89c102a744

View file

@ -625,11 +625,11 @@ function phpbb_increment_downloads($db, $ids)
function phpbb_filter_disallowed_extensions($extensions, $attachments)
{
$result = array();
foreach ($attachments as $row)
foreach ($attachments as $key => $row)
{
if (isset($extensions['_allowed_'][$row['extension']]))
{
$result[] = $row;
$result[$key] = $row;
}
}