1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

"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
This commit is contained in:
Meik Sievertsen
2007-04-30 13:32:18 +00:00
parent ef427b6483
commit 816bc5da61
9 changed files with 125 additions and 64 deletions

View File

@@ -72,11 +72,24 @@ function compose_pm($id, $mode, $action)
{
if ($config['allow_mass_pm'] && $auth->acl_get('u_masspm'))
{
$sql = 'SELECT group_id, group_name, group_type
FROM ' . GROUPS_TABLE . '
WHERE group_type <> ' . GROUP_HIDDEN . '
AND group_receive_pm = 1
ORDER BY group_type DESC';
$sql = 'SELECT g.group_id, g.group_name, g.group_type
FROM ' . GROUPS_TABLE . ' g';
if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
$sql .= ' 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'] . ')';
}
$sql .= ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND ';
$sql .= 'g.group_receive_pm = 1
ORDER BY g.group_type DESC, g.group_name ASC';
$result = $db->sql_query($sql);
$group_options = '';
@@ -731,17 +744,33 @@ function compose_pm($id, $mode, $action)
{
$sql = 'SELECT user_id as id, username as name, user_colour as colour
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($address_list['u'])));
WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($address_list['u']))) . '
ORDER BY username_clean ASC';
$result['u'] = $db->sql_query($sql);
}
if (!empty($address_list['g']))
{
$sql = 'SELECT group_id as id, group_name as name, group_colour as colour, group_type
FROM ' . GROUPS_TABLE . '
WHERE group_receive_pm = 1
AND group_type <> ' . GROUP_HIDDEN . '
AND ' . $db->sql_in_set('group_id', array_map('intval', array_keys($address_list['g'])));
$sql = 'SELECT g.group_id AS id, g.group_name AS name, g.group_colour AS colour, g.group_type
FROM ' . GROUPS_TABLE . ' g';
if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
$sql .= ' 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'] . ')';
}
$sql .= ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND ';
$sql .= 'g.group_receive_pm = 1
AND ' . $db->sql_in_set('g.group_id', array_map('intval', array_keys($address_list['g']))) . '
ORDER BY g.group_name ASC';
$result['g'] = $db->sql_query($sql);
}