mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/avatars] Get rid of array_keys() in gallery avatar
PHPBB3-10018
This commit is contained in:
parent
01b313ea26
commit
24ac039336
1 changed files with 6 additions and 3 deletions
|
@ -52,9 +52,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
|||
$avatar_list = $this->get_avatar_list();
|
||||
$category = $this->request->variable('av_local_cat', '');
|
||||
|
||||
$categories = array_keys($avatar_list);
|
||||
|
||||
foreach ($categories as $cat)
|
||||
foreach ($avatar_list as $cat => $null)
|
||||
{
|
||||
if (!empty($avatar_list[$cat]))
|
||||
{
|
||||
|
@ -63,6 +61,11 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
|||
'SELECTED' => ($cat == $category),
|
||||
));
|
||||
}
|
||||
|
||||
if ($cat != $category)
|
||||
{
|
||||
unset($avatar_list[$cat]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($avatar_list[$category]))
|
||||
|
|
Loading…
Add table
Reference in a new issue