diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2007-03-07 16:55:20 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-03-07 16:55:20 +0000 |
| commit | d1e839625ee9b0ca796f83ff55404af4c6307561 (patch) | |
| tree | 6f9f4ec262aa908150d261e51f862874b7fbfeca /phpBB/index.php | |
| parent | 4eac4b268b98ec65b7432685de147d76618e479d (diff) | |
| download | forums-d1e839625ee9b0ca796f83ff55404af4c6307561.tar forums-d1e839625ee9b0ca796f83ff55404af4c6307561.tar.gz forums-d1e839625ee9b0ca796f83ff55404af4c6307561.tar.bz2 forums-d1e839625ee9b0ca796f83ff55404af4c6307561.tar.xz forums-d1e839625ee9b0ca796f83ff55404af4c6307561.zip | |
- fix some group specific bugs
- correctly determining terrafrost's birthday mod
git-svn-id: file:///svn/phpbb/trunk@7143 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/index.php')
| -rw-r--r-- | phpBB/index.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/phpBB/index.php b/phpBB/index.php index 84faea917f..92eda26000 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -36,16 +36,27 @@ $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 group_id, group_name, group_colour, group_type - FROM ' . GROUPS_TABLE . ' - WHERE group_legend = 1 - AND group_type <> ' . GROUP_HIDDEN . ' - ORDER BY group_name ASC'; +$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id + 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 + 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') |
