mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/12838] Allow for extra columns in cache obtain_ranks()
PHPBB3-12838
This commit is contained in:
parent
c9803b7ba3
commit
08264ec3af
1 changed files with 14 additions and 13 deletions
27
phpBB/phpbb/cache/service.php
vendored
27
phpBB/phpbb/cache/service.php
vendored
|
@ -166,20 +166,21 @@ class service
|
||||||
$ranks = array();
|
$ranks = array();
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if ($row['rank_special'])
|
foreach ($row as $field => $data)
|
||||||
{
|
{
|
||||||
$ranks['special'][$row['rank_id']] = array(
|
if ($field == 'rank_special' || ($row['rank_special'] && $field == 'rank_min'))
|
||||||
'rank_title' => $row['rank_title'],
|
{
|
||||||
'rank_image' => $row['rank_image']
|
continue;
|
||||||
);
|
}
|
||||||
}
|
|
||||||
else
|
if ($row['rank_special'])
|
||||||
{
|
{
|
||||||
$ranks['normal'][] = array(
|
$ranks['special'][$row['rank_id']][$field] = $data;
|
||||||
'rank_title' => $row['rank_title'],
|
}
|
||||||
'rank_min' => $row['rank_min'],
|
else
|
||||||
'rank_image' => $row['rank_image']
|
{
|
||||||
);
|
$ranks['normal'][$row['rank_id']][$field] = $data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue