aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/index.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-04-30 13:32:18 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-04-30 13:32:18 +0000
commit816bc5da616f1326d97fa20ccf59f3b1bca9fe1d (patch)
tree912bfdefef01c5b362af07bce0517cea0a0983d2 /phpBB/index.php
parentef427b6483e89d797fed11485bdc857039d3b61f (diff)
downloadforums-816bc5da616f1326d97fa20ccf59f3b1bca9fe1d.tar
forums-816bc5da616f1326d97fa20ccf59f3b1bca9fe1d.tar.gz
forums-816bc5da616f1326d97fa20ccf59f3b1bca9fe1d.tar.bz2
forums-816bc5da616f1326d97fa20ccf59f3b1bca9fe1d.tar.xz
forums-816bc5da616f1326d97fa20ccf59f3b1bca9fe1d.zip
"Ghost" topics in active topics list when shadow topics and corresponding topic in same resultset [#10313]
Find a member supporting hidden groups for those able to see them [#10305] Display hidden groups for all those able to see them across the board (composing messages, viewonline) Fix space for sending PM's to groups Let the permissions_phpbb file be included the same way as all other permission files [#10301] Add request_a-z+ handling within modules_auth suggested by Pyramide. This will allow modders to directly show/hide their module in addition to !empty() $_REQUEST variables. [#10297] git-svn-id: file:///svn/phpbb/trunk@7433 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/index.php')
-rw-r--r--phpBB/index.php32
1 files changed, 21 insertions, 11 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index daa89f2503..209bcfc2bd 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -36,17 +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 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 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';
+if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
+{
+ $sql = 'SELECT group_id, group_name, group_colour, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_legend = 1
+ ORDER BY group_name ASC';
+}
+else
+{
+ $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 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 = '';