mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +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:
@@ -3151,8 +3151,15 @@ function get_backtrace()
|
||||
}
|
||||
|
||||
// Strip the current directory from path
|
||||
$trace['file'] = str_replace(array($path, '\\'), array('', '/'), $trace['file']);
|
||||
$trace['file'] = substr($trace['file'], 1);
|
||||
if (empty($trace['file']))
|
||||
{
|
||||
$trace['file'] = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$trace['file'] = str_replace(array($path, '\\'), array('', '/'), $trace['file']);
|
||||
$trace['file'] = substr($trace['file'], 1);
|
||||
}
|
||||
$args = array();
|
||||
|
||||
// If include/require/include_once is not called, do not show arguments - they may contain sensible information
|
||||
@@ -3177,7 +3184,7 @@ function get_backtrace()
|
||||
|
||||
$output .= '<br />';
|
||||
$output .= '<b>FILE:</b> ' . htmlspecialchars($trace['file']) . '<br />';
|
||||
$output .= '<b>LINE:</b> ' . $trace['line'] . '<br />';
|
||||
$output .= '<b>LINE:</b> ' . ((!empty($trace['line'])) ? $trace['line'] : '') . '<br />';
|
||||
|
||||
$output .= '<b>CALL:</b> ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function']) . '(' . ((sizeof($args)) ? implode(', ', $args) : '') . ')<br />';
|
||||
}
|
||||
|
@@ -2390,7 +2390,7 @@ function get_group_name($group_id)
|
||||
|
||||
/**
|
||||
* Obtain either the members of a specified group, the groups the specified user is subscribed to
|
||||
* or checking if a specified user is in a specified group
|
||||
* or checking if a specified user is in a specified group. This function does not return pending memberships.
|
||||
*
|
||||
* Note: Never use this more than once... first group your users/groups
|
||||
*/
|
||||
|
@@ -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