mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
Updates for changes to filelist()
git-svn-id: file:///svn/phpbb/trunk@4289 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
60ce0c9bb3
commit
ab410e2c19
3 changed files with 41 additions and 32 deletions
|
@ -660,10 +660,13 @@ if ($mode == 'ext_groups')
|
||||||
$imglist = filelist($phpbb_root_path . $img_path, '');
|
$imglist = filelist($phpbb_root_path . $img_path, '');
|
||||||
|
|
||||||
$filename_list = '';
|
$filename_list = '';
|
||||||
foreach ($imglist as $img)
|
foreach ($imglist as $path => $img_ary)
|
||||||
{
|
{
|
||||||
$img = substr($img['path'], 1) . (($img['path'] != '') ? '/' : '') . $img['file'];
|
foreach ($img_ary as $img)
|
||||||
$filename_list .= '<option value="' . htmlspecialchars($img) . '">' . $img . '</option>';
|
{
|
||||||
|
$img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
|
||||||
|
$filename_list .= '<option value="' . htmlspecialchars($img) . '">' . $img . '</option>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$size = isset($_REQUEST['size']) ? intval($_REQUEST['size']) : 0;
|
$size = isset($_REQUEST['size']) ? intval($_REQUEST['size']) : 0;
|
||||||
|
|
|
@ -165,24 +165,27 @@ switch ($action)
|
||||||
$imglist = filelist($phpbb_root_path . $img_path, '');
|
$imglist = filelist($phpbb_root_path . $img_path, '');
|
||||||
|
|
||||||
$filename_list = '';
|
$filename_list = '';
|
||||||
foreach ($imglist as $img)
|
foreach ($imglist as $path => $img_ary)
|
||||||
{
|
{
|
||||||
$img = substr($img['path'], 1) . (($img['path'] != '') ? '/' : '') . $img['file'];
|
foreach ($img_ary as $img)
|
||||||
|
|
||||||
if (!in_array($img, $existing_imgs) || $action == 'edit')
|
|
||||||
{
|
{
|
||||||
if ((isset($data) && $img == $data[$fields . '_url']) ||
|
$img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
|
||||||
(!isset($data) && !isset($edit_img)))
|
|
||||||
{
|
|
||||||
$selected = ' selected="selected"';
|
|
||||||
$edit_img = $img;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$selected = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$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);
|
unset($existing_imgs);
|
||||||
|
|
|
@ -94,23 +94,26 @@ switch ($mode)
|
||||||
$imglist = filelist($phpbb_root_path . $config['ranks_path'], '');
|
$imglist = filelist($phpbb_root_path . $config['ranks_path'], '');
|
||||||
|
|
||||||
$edit_img = $filename_list = '';
|
$edit_img = $filename_list = '';
|
||||||
foreach ($imglist as $img)
|
foreach ($imglist as $path => $img_ary)
|
||||||
{
|
{
|
||||||
$img = substr($img['path'], 1) . (($img['path'] != '') ? '/' : '') . $img['file'];
|
foreach ($img_ary as $img)
|
||||||
|
|
||||||
if (!in_array($img, $existing_imgs) || $mode == 'edit')
|
|
||||||
{
|
{
|
||||||
if ($ranks && $img == $ranks['rank_image'])
|
$img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
|
||||||
{
|
|
||||||
$selected = ' selected="selected"';
|
|
||||||
$edit_img = $img;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$selected = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
|
if (!in_array($img, $existing_imgs) || $mode == 'edit')
|
||||||
|
{
|
||||||
|
if ($ranks && $img == $ranks['rank_image'])
|
||||||
|
{
|
||||||
|
$selected = ' selected="selected"';
|
||||||
|
$edit_img = $img;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$selected = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>----------</option>' . $filename_list;
|
$filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>----------</option>' . $filename_list;
|
||||||
|
|
Loading…
Add table
Reference in a new issue