mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-17 14:18:24 +01:00
[ticket/12838] Simplify normal special rank array creation
PHPBB3-12838
This commit is contained in:
parent
8d8e0aae68
commit
d8d09e0df2
21
phpBB/phpbb/cache/service.php
vendored
21
phpBB/phpbb/cache/service.php
vendored
@ -166,21 +166,14 @@ class service
|
||||
$ranks = array();
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
foreach ($row as $field => $data)
|
||||
if ($row['rank_special'])
|
||||
{
|
||||
if ($field == 'rank_special' || ($row['rank_special'] && $field == 'rank_min'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($row['rank_special'])
|
||||
{
|
||||
$ranks['special'][$row['rank_id']][$field] = $data;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ranks['normal'][$row['rank_id']][$field] = $data;
|
||||
}
|
||||
unset($row['rank_min']);
|
||||
$ranks['special'][$row['rank_id']] = $row;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ranks['normal'][$row['rank_id']] = $row;
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user