mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
git-svn-id: file:///svn/phpbb/trunk@7320 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
4376e86a9e
commit
586c90b37a
1 changed files with 2 additions and 7 deletions
|
@ -36,27 +36,22 @@ $l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER'
|
|||
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';
|
||||
|
||||
// Grab group details for legend display
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g
|
||||
LEFT JOIN ' . USER_GROUP_TABLE . ' ug
|
||||
ON (
|
||||
g.group_id = ug.group_id
|
||||
AND g.group_type = ' . GROUP_HIDDEN . '
|
||||
AND ug.user_id = ' . $user->data['user_id'] . '
|
||||
AND ug.user_pending = 0
|
||||
)
|
||||
WHERE g.group_legend = 1
|
||||
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
|
||||
ORDER BY g.group_name ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$legend = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($row['group_type'] == GROUP_HIDDEN && empty($row['user_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
|
||||
|
||||
if ($row['group_name'] == 'BOTS')
|
||||
|
|
Loading…
Add table
Reference in a new issue