mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00: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:
parent
295a463e99
commit
6e80318f89
2 changed files with 16 additions and 6 deletions
|
@ -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':
|
||||
|
|
|
@ -512,7 +512,7 @@ $lang = array_merge($lang, array(
|
|||
'LOG_USER_MOVE_POSTS' => '<b>Moved user posts</b><br />» posts by "%s" to forum "%s"',
|
||||
'LOG_USER_NEW_PASSWORD' => '<b>Changed user password</b><br />» %s',
|
||||
'LOG_USER_REACTIVATE' => '<b>Forced user account re-activation</b><br />» %s',
|
||||
'LOG_USER_UPDATE_EMAIL' => '<b>User "%s" changed email</b>» from "%s" to "%s"',
|
||||
'LOG_USER_UPDATE_EMAIL' => '<b>User "%s" changed email</b><br />» from "%s" to "%s"',
|
||||
'LOG_USER_UPDATE_NAME' => '<b>Changed username</b><br />» from "%s" to "%s"',
|
||||
'LOG_USER_USER_UPDATE' => '<b>Updated user details</b><br />» %s',
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue