1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00

ok, slap me once..... but hard. (all acl entries got removed while setting permissions... you want users having more than one permisions, don't you?)

git-svn-id: file:///svn/phpbb/trunk@5576 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-02-23 21:06:15 +00:00
parent ac011448ab
commit c941b1863a
2 changed files with 106 additions and 33 deletions

View File

@@ -743,23 +743,7 @@ class acp_permissions
trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
}
// Remove permission type
$sql = 'SELECT auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '{$permission_type}%'";
$result = $db->sql_query($sql);
$option_id_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$option_id_ary[] = $row['auth_option_id'];
}
$db->sql_freeresult($result);
if (sizeof($option_id_ary))
{
$auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : false), $option_id_ary);
}
$auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : false), $permission_type);
// Do we need to recache the moderator lists?
if ($permission_type == 'm_')