1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

Users allowed to resign only from open and freely open groups - #19355

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8368 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-02-02 15:19:55 +00:00
parent 91bde229ef
commit efdb743f60
3 changed files with 17 additions and 2 deletions

View File

@ -118,6 +118,7 @@
<li>[Fix] Handle generation of form tokens when maximum time is set to -1</li>
<li>[Fix] Correctly delete unapproved posts without deleting the topic (Bug #15120)</li>
<li>[Fix] Respect signature permissions in posting (Bug #16029)</li>
<li>[Fix] Users allowed to resign only from open and freely open groups (Bug #19355)</li>
</ul>

View File

@ -127,6 +127,18 @@ class ucp_groups
}
list(, $row) = each($row);
$sql = 'SELECT group_type
FROM ' . GROUPS_TABLE . '
WHERE group_id = ' . $group_id;
$result = $db->sql_query($sql);
$group_type = (int) $db->sql_fetchfield('group_type');
$db->sql_freeresult($result);
if ($group_type != GROUP_OPEN && $group_type != GROUP_FREE)
{
trigger_error($user->lang['CANNOT_RESIGN_GROUP'] . $return_page);
}
if (confirm_box(true))
{
group_user_del($group_id, $user->data['user_id']);

View File

@ -40,8 +40,10 @@ $lang = array_merge($lang, array(
'ALREADY_IN_GROUP' => 'You are already a member of the selected group.',
'ALREADY_IN_GROUP_PENDING' => 'You already requested joining the selected group.',
'CHANGED_DEFAULT_GROUP' => 'Successfully changed default group.',
'CANNOT_JOIN_GROUP' => 'You are not able to join this group. You are only able to join open and freely open groups.',
'CANNOT_RESIGN_GROUP' => 'You are not able to resign from this group. You are only able to resign from open and freely open groups.',
'CHANGED_DEFAULT_GROUP' => 'Successfully changed default group.',
'GROUP_AVATAR' => 'Group avatar',
'GROUP_CHANGE_DEFAULT' => 'Are you sure you want to change your default membership to the group “%s”?',
'GROUP_CLOSED' => 'Closed',