mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-30 02:59:29 +02:00
Merge pull request #6556 from GanstaZ/ticket/17200
[ticket/17200] Fix color parse error in viewonline legend
This commit is contained in:
commit
88bbd0fca6
@ -470,20 +470,25 @@ else
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$legend = '';
|
||||
$legend = [];
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
|
||||
$group_name = $group_helper->get_name($row['group_name']);
|
||||
|
||||
if ($row['group_name'] == 'BOTS')
|
||||
{
|
||||
$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…
x
Reference in New Issue
Block a user