From 816bc5da616f1326d97fa20ccf59f3b1bca9fe1d Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 30 Apr 2007 13:32:18 +0000 Subject: "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 --- phpBB/memberlist.php | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'phpBB/memberlist.php') diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index d65ea1a167..11aeda5dca 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -406,7 +406,7 @@ switch ($mode) $sql = 'SELECT g.group_id, g.group_name, g.group_type FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug WHERE ug.user_id = $user_id - AND g.group_id = ug.group_id" . ((!$auth->acl_get('a_group')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . ' + AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . ' AND ug.user_pending = 0 ORDER BY g.group_type, g.group_name'; $result = $db->sql_query($sql); @@ -1180,10 +1180,25 @@ switch ($mode) $group_selected = request_var('search_group_id', 0); $s_group_select = ''; - $sql = 'SELECT group_id, group_name, group_type - FROM ' . GROUPS_TABLE . ' - WHERE group_type <> ' . GROUP_HIDDEN . ' - ORDER BY group_name ASC'; + if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) + { + $sql = 'SELECT group_id, group_name, group_type + FROM ' . GROUPS_TABLE . ' + ORDER BY group_name ASC'; + } + else + { + $sql = 'SELECT g.group_id, g.group_name, 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_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ') + ORDER BY g.group_name ASC'; + } $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) -- cgit v1.2.1