]> git.mjollnir.org Git - moodle.git/commitdiff
do not write inherit into db!
authortoyomoyo <toyomoyo>
Tue, 10 Oct 2006 09:22:38 +0000 (09:22 +0000)
committertoyomoyo <toyomoyo>
Tue, 10 Oct 2006 09:22:38 +0000 (09:22 +0000)
admin/roles/manage.php

index 355c7e33592527ea7dfb410dad2f47df88ee3497..ecb47e001480a3a7b285b118d7c69a5f51f41121 100755 (executable)
                     $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 {
                             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);
+                        }
                     }
                 }