aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/auth.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-21 21:39:16 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-21 21:39:16 +0000
commit6e80318f89f0611c70466249869fa8fdc940c71d (patch)
treeb396c7b985c6067e9c4677978150e70372ae10cc /phpBB/includes/acp/auth.php
parent295a463e99c5543a2cc78aad87d8bfdf23399a3b (diff)
downloadforums-6e80318f89f0611c70466249869fa8fdc940c71d.tar
forums-6e80318f89f0611c70466249869fa8fdc940c71d.tar.gz
forums-6e80318f89f0611c70466249869fa8fdc940c71d.tar.bz2
forums-6e80318f89f0611c70466249869fa8fdc940c71d.tar.xz
forums-6e80318f89f0611c70466249869fa8fdc940c71d.zip
ability to set all role options to UNSET
git-svn-id: file:///svn/phpbb/trunk@5680 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/auth.php')
-rw-r--r--phpBB/includes/acp/auth.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 928f3b7dca..c1e1c4cc5e 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -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':