mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
- fix some group specific bugs
- correctly determining terrafrost's birthday mod git-svn-id: file:///svn/phpbb/trunk@7143 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -143,8 +143,22 @@ class ucp_groups
|
||||
|
||||
case 'join':
|
||||
|
||||
if (group_memberships($group_id, $user->data['user_id'], true))
|
||||
$sql = 'SELECT ug.*, u.username, u.username_clean, u.user_email
|
||||
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
|
||||
WHERE ug.user_id = u.user_id
|
||||
AND ug.group_id = ' . $group_id . '
|
||||
AND ug.user_id = ' . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
if ($row['user_pending'])
|
||||
{
|
||||
trigger_error($user->lang['ALREADY_IN_GROUP_PENDING'] . $return_page);
|
||||
}
|
||||
|
||||
trigger_error($user->lang['ALREADY_IN_GROUP'] . $return_page);
|
||||
}
|
||||
|
||||
@@ -817,7 +831,7 @@ class ucp_groups
|
||||
// Approve, demote or promote
|
||||
group_user_attributes('approve', $group_id, $mark_ary, false, ($group_id) ? $group_row['group_name'] : false);
|
||||
|
||||
trigger_error($user->lang['USERS_APPROVED'] . $return_page);
|
||||
trigger_error($user->lang['USERS_APPROVED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&action=list&g=' . $group_id . '">', '</a>'));
|
||||
|
||||
break;
|
||||
|
||||
@@ -881,7 +895,7 @@ class ucp_groups
|
||||
|
||||
$user->add_lang('acp/groups');
|
||||
|
||||
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . $return_page);
|
||||
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&action=list&g=' . $group_id . '">', '</a>'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -924,10 +938,10 @@ class ucp_groups
|
||||
|
||||
if ($error)
|
||||
{
|
||||
trigger_error($user->lang[$error] . $return_page);
|
||||
trigger_error($user->lang[$error] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&action=list&g=' . $group_id . '">', '</a>'));
|
||||
}
|
||||
|
||||
trigger_error($user->lang['GROUP_USERS_REMOVE'] . $return_page);
|
||||
trigger_error($user->lang['GROUP_USERS_REMOVE'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&action=list&g=' . $group_id . '">', '</a>'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -980,7 +994,7 @@ class ucp_groups
|
||||
trigger_error($user->lang[$error] . $return_page);
|
||||
}
|
||||
|
||||
trigger_error($user->lang['GROUP_USERS_ADDED'] . $return_page);
|
||||
trigger_error($user->lang['GROUP_USERS_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&action=list&g=' . $group_id . '">', '</a>'));
|
||||
|
||||
break;
|
||||
|
||||
|
@@ -74,7 +74,7 @@ function compose_pm($id, $mode, $action)
|
||||
{
|
||||
$sql = 'SELECT group_id, group_name, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_type NOT IN (' . GROUP_HIDDEN . ', ' . GROUP_CLOSED . ')
|
||||
WHERE group_type <> ' . GROUP_HIDDEN . '
|
||||
AND group_receive_pm = 1
|
||||
ORDER BY group_type DESC';
|
||||
$result = $db->sql_query($sql);
|
||||
@@ -730,6 +730,7 @@ function compose_pm($id, $mode, $action)
|
||||
$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'])));
|
||||
$result['g'] = $db->sql_query($sql);
|
||||
}
|
||||
|
Reference in New Issue
Block a user