]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12180, blocks capabilities not appearing when overriding block roles
authortoyomoyo <toyomoyo>
Thu, 15 Nov 2007 07:46:04 +0000 (07:46 +0000)
committertoyomoyo <toyomoyo>
Thu, 15 Nov 2007 07:46:04 +0000 (07:46 +0000)
lib/accesslib.php

index b819cdb1c584dab22e77bb5c9f3e7f781bbc4bc3..bc1356d0bfd43de5021eff24276e974380708b56 100755 (executable)
@@ -3507,8 +3507,8 @@ function fetch_context_capabilities($context) {
             $cb = get_record('block_instance', 'id', $context->instanceid);
             $block = get_record('block', 'id', $cb->blockid);
 
-            $SQL = "select * from {$CFG->prefix}capabilities where contextlevel = ".CONTEXT_BLOCK."
-                    and ( component = 'block/$block->name' or component = 'moodle')";
+            $SQL = "select * from {$CFG->prefix}capabilities where (contextlevel = ".CONTEXT_BLOCK." AND component = 'moodle')
+                    OR (component = 'block/$block->name')";
         break;
 
         default: