diff options
author | PayBas <contact@paybas.com> | 2014-08-07 14:24:21 +0200 |
---|---|---|
committer | PayBas <contact@paybas.com> | 2014-08-07 14:24:21 +0200 |
commit | d8d09e0df2729df000ac8384c48262f8b2d333ac (patch) | |
tree | 68abb86bffbd3e75354d78d7dfa4c617405dd9a9 /phpBB/phpbb/cache/service.php | |
parent | 8d8e0aae68c23d985c1fdee6533df42dd2d6c906 (diff) | |
download | forums-d8d09e0df2729df000ac8384c48262f8b2d333ac.tar forums-d8d09e0df2729df000ac8384c48262f8b2d333ac.tar.gz forums-d8d09e0df2729df000ac8384c48262f8b2d333ac.tar.bz2 forums-d8d09e0df2729df000ac8384c48262f8b2d333ac.tar.xz forums-d8d09e0df2729df000ac8384c48262f8b2d333ac.zip |
[ticket/12838] Simplify normal special rank array creation
PHPBB3-12838
Diffstat (limited to 'phpBB/phpbb/cache/service.php')
-rw-r--r-- | phpBB/phpbb/cache/service.php | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/phpBB/phpbb/cache/service.php b/phpBB/phpbb/cache/service.php index a86e8c31de..b06462fcf0 100644 --- a/phpBB/phpbb/cache/service.php +++ b/phpBB/phpbb/cache/service.php @@ -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); |