mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[feature/attach-dl] phpbb_filter_disallowed_extensions: Preserve array keys.
PHPBB3-11042
This commit is contained in:
@@ -625,11 +625,11 @@ function phpbb_increment_downloads($db, $ids)
|
|||||||
function phpbb_filter_disallowed_extensions($extensions, $attachments)
|
function phpbb_filter_disallowed_extensions($extensions, $attachments)
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
foreach ($attachments as $row)
|
foreach ($attachments as $key => $row)
|
||||||
{
|
{
|
||||||
if (isset($extensions['_allowed_'][$row['extension']]))
|
if (isset($extensions['_allowed_'][$row['extension']]))
|
||||||
{
|
{
|
||||||
$result[] = $row;
|
$result[$key] = $row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user