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

ability to set all role options to UNSET

git-svn-id: file:///svn/phpbb/trunk@5680 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-03-21 21:39:16 +00:00
parent 295a463e99
commit 6e80318f89
2 changed files with 16 additions and 6 deletions

View File

@@ -845,11 +845,6 @@ class auth_admin extends auth
}
}
// Remove current auth options...
$sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
WHERE role_id = ' . $role_id;
$db->sql_query($sql);
$sql_ary = array();
foreach ($auth as $auth_option => $setting)
{
@@ -865,6 +860,21 @@ class auth_admin extends auth
}
}
// If no data is there, we set the any-flag to ACL_NO...
if (!sizeof($sql_ary))
{
$sql_ary[] = array(
'role_id' => (int) $role_id,
'auth_option_id' => $this->option_ids[$flag],
'auth_setting' => ACL_NO
);
}
// Remove current auth options...
$sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
WHERE role_id = ' . $role_id;
$db->sql_query($sql);
switch (SQL_LAYER)
{
case 'mysql':