MDL-12180, blocks capabilities not appearing when overriding block roles

This commit is contained in:
toyomoyo 2007-11-15 07:46:04 +00:00
parent dea2f0d945
commit ba1393b43f

View File

@ -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: