mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
- Bug 1301
git-svn-id: file:///svn/phpbb/trunk@5743 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1058,16 +1058,16 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var
|
||||
// Collect images
|
||||
$dp = @opendir($path);
|
||||
|
||||
while ($file = readdir($dp))
|
||||
while (($file = readdir($dp)) !== false)
|
||||
{
|
||||
if ($file{0} != '.' && is_dir("$path/$file"))
|
||||
{
|
||||
$avatar_row_count = $avatar_col_count = 0;
|
||||
|
||||
$dp2 = @opendir("$path/$file");
|
||||
while ($sub_file = readdir($dp2))
|
||||
while (($sub_file = readdir($dp2)) !== false)
|
||||
{
|
||||
if (preg_match('#\.(gif$|png$|jpg|jpeg)$#i', $sub_file))
|
||||
if (preg_match('#\.(?:gif|png|jpe?g)$#i', $sub_file))
|
||||
{
|
||||
$avatar_list[$file][$avatar_row_count][$avatar_col_count] = array(
|
||||
'file' => "$file/$sub_file",
|
||||
|
Reference in New Issue
Block a user