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:
@@ -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':
|
||||
|
Reference in New Issue
Block a user