aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/cache/service.php
diff options
context:
space:
mode:
authorPayBas <contact@paybas.com>2014-07-10 17:54:08 +0200
committerPayBas <contact@paybas.com>2014-07-10 17:54:08 +0200
commit08264ec3af0a372ae25a7ccbe318e939b76c30ba (patch)
tree2cf0aecb569b6c2440c7fb677baed6765af474ae /phpBB/phpbb/cache/service.php
parentc9803b7ba35a790524e0b6e959eafe912192f5bb (diff)
downloadforums-08264ec3af0a372ae25a7ccbe318e939b76c30ba.tar
forums-08264ec3af0a372ae25a7ccbe318e939b76c30ba.tar.gz
forums-08264ec3af0a372ae25a7ccbe318e939b76c30ba.tar.bz2
forums-08264ec3af0a372ae25a7ccbe318e939b76c30ba.tar.xz
forums-08264ec3af0a372ae25a7ccbe318e939b76c30ba.zip
[ticket/12838] Allow for extra columns in cache obtain_ranks()
PHPBB3-12838
Diffstat (limited to 'phpBB/phpbb/cache/service.php')
-rw-r--r--phpBB/phpbb/cache/service.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/phpBB/phpbb/cache/service.php b/phpBB/phpbb/cache/service.php
index d6bf150384..a86e8c31de 100644
--- a/phpBB/phpbb/cache/service.php
+++ b/phpBB/phpbb/cache/service.php
@@ -166,20 +166,21 @@ class service
$ranks = array();
while ($row = $this->db->sql_fetchrow($result))
{
- if ($row['rank_special'])
+ foreach ($row as $field => $data)
{
- $ranks['special'][$row['rank_id']] = array(
- 'rank_title' => $row['rank_title'],
- 'rank_image' => $row['rank_image']
- );
- }
- else
- {
- $ranks['normal'][] = array(
- 'rank_title' => $row['rank_title'],
- 'rank_min' => $row['rank_min'],
- 'rank_image' => $row['rank_image']
- );
+ 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;
+ }
}
}
$this->db->sql_freeresult($result);