diff --git a/phpBB/adm/admin_attachments.php b/phpBB/adm/admin_attachments.php
index 72980e58f6..2def31433f 100644
--- a/phpBB/adm/admin_attachments.php
+++ b/phpBB/adm/admin_attachments.php
@@ -660,10 +660,13 @@ if ($mode == 'ext_groups')
$imglist = filelist($phpbb_root_path . $img_path, '');
$filename_list = '';
- foreach ($imglist as $img)
+ foreach ($imglist as $path => $img_ary)
{
- $img = substr($img['path'], 1) . (($img['path'] != '') ? '/' : '') . $img['file'];
- $filename_list .= '';
+ foreach ($img_ary as $img)
+ {
+ $img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
+ $filename_list .= '';
+ }
}
$size = isset($_REQUEST['size']) ? intval($_REQUEST['size']) : 0;
diff --git a/phpBB/adm/admin_icons.php b/phpBB/adm/admin_icons.php
index 49ba521563..f09173dd29 100644
--- a/phpBB/adm/admin_icons.php
+++ b/phpBB/adm/admin_icons.php
@@ -165,24 +165,27 @@ switch ($action)
$imglist = filelist($phpbb_root_path . $img_path, '');
$filename_list = '';
- foreach ($imglist as $img)
+ foreach ($imglist as $path => $img_ary)
{
- $img = substr($img['path'], 1) . (($img['path'] != '') ? '/' : '') . $img['file'];
-
- if (!in_array($img, $existing_imgs) || $action == 'edit')
+ foreach ($img_ary as $img)
{
- if ((isset($data) && $img == $data[$fields . '_url']) ||
- (!isset($data) && !isset($edit_img)))
- {
- $selected = ' selected="selected"';
- $edit_img = $img;
- }
- else
- {
- $selected = '';
- }
+ $img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
- $filename_list .= '';
+ if (!in_array($img, $existing_imgs) || $action == 'edit')
+ {
+ if ((isset($data) && $img == $data[$fields . '_url']) ||
+ (!isset($data) && !isset($edit_img)))
+ {
+ $selected = ' selected="selected"';
+ $edit_img = $img;
+ }
+ else
+ {
+ $selected = '';
+ }
+
+ $filename_list .= '';
+ }
}
}
unset($existing_imgs);
diff --git a/phpBB/adm/admin_ranks.php b/phpBB/adm/admin_ranks.php
index 2064818aac..7869ec1600 100644
--- a/phpBB/adm/admin_ranks.php
+++ b/phpBB/adm/admin_ranks.php
@@ -94,23 +94,26 @@ switch ($mode)
$imglist = filelist($phpbb_root_path . $config['ranks_path'], '');
$edit_img = $filename_list = '';
- foreach ($imglist as $img)
+ foreach ($imglist as $path => $img_ary)
{
- $img = substr($img['path'], 1) . (($img['path'] != '') ? '/' : '') . $img['file'];
-
- if (!in_array($img, $existing_imgs) || $mode == 'edit')
+ foreach ($img_ary as $img)
{
- if ($ranks && $img == $ranks['rank_image'])
- {
- $selected = ' selected="selected"';
- $edit_img = $img;
- }
- else
- {
- $selected = '';
- }
+ $img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
- $filename_list .= '';
+ if (!in_array($img, $existing_imgs) || $mode == 'edit')
+ {
+ if ($ranks && $img == $ranks['rank_image'])
+ {
+ $selected = ' selected="selected"';
+ $edit_img = $img;
+ }
+ else
+ {
+ $selected = '';
+ }
+
+ $filename_list .= '';
+ }
}
}
$filename_list = '' . $filename_list;