1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-17 14:10:45 +02:00

Updates for changes to filelist()

git-svn-id: file:///svn/phpbb/trunk@4289 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2003-07-20 14:18:53 +00:00
parent 60ce0c9bb3
commit ab410e2c19
3 changed files with 41 additions and 32 deletions

View File

@@ -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 .= '<option value="' . $img . '"' . htmlspecialchars($img) . $selected . '>' . $img . '</option>';
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 .= '<option value="' . $img . '"' . htmlspecialchars($img) . $selected . '>' . $img . '</option>';
}
}
}
unset($existing_imgs);