mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17200] Fix color error in viewonline legend
PHPBB3-17200
This commit is contained in:
parent
7e6c5df710
commit
79b8f56427
1 changed files with 9 additions and 4 deletions
|
@ -470,20 +470,25 @@ else
|
|||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$legend = '';
|
||||
$legend = [];
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($row['group_name'] == 'BOTS')
|
||||
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
|
||||
$group_name = $group_helper->get_name($row['group_name']);
|
||||
|
||||
if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<span style="color:#' . $row['group_colour'] . '">' . $user->lang['G_BOTS'] . '</span>';
|
||||
$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_helper->get_name($row['group_name']) . '</a>';
|
||||
$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$legend = implode($user->lang['COMMA_SEPARATOR'], $legend);
|
||||
|
||||
// Refreshing the page every 60 seconds...
|
||||
meta_refresh(60, append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&sk=$sort_key&sd=$sort_dir&start=$start"));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue