From: toyomoyo Date: Tue, 10 Oct 2006 09:22:38 +0000 (+0000) Subject: do not write inherit into db! X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=55656968b3d16c4daf6a0ca8be987da62bd8b69f;p=moodle.git do not write inherit into db! --- diff --git a/admin/roles/manage.php b/admin/roles/manage.php index 355c7e3359..ecb47e0014 100755 --- a/admin/roles/manage.php +++ b/admin/roles/manage.php @@ -151,7 +151,7 @@ $localoverride = get_record_sql($SQL); if ($localoverride) { // update current overrides - if ($value == 0) { // inherit = delete + if ($value == CAP_INHERIT) { // inherit = delete unassign_capability($capname, $roleid, $sitecontext->id); } else { @@ -161,7 +161,9 @@ update_record('role_capabilities', $localoverride); } } else { // insert a record - assign_capability($capname, $value, $roleid, $sitecontext->id); + if ($value != CAP_INHERIT) { + assign_capability($capname, $value, $roleid, $sitecontext->id); + } } }