Merge branch 'MDL-37797_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE
This commit is contained in:
+1
-1
@@ -4236,7 +4236,7 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
|
||||
send_file_not_found();
|
||||
}
|
||||
|
||||
$bprecord = $DB->get_record('block_positions', array('blockinstanceid' => $context->instanceid), 'visible');
|
||||
$bprecord = $DB->get_record('block_positions', array('contextid' => $context->id, 'blockinstanceid' => $context->instanceid));
|
||||
// User can't access file, if block is hidden or doesn't have block:view capability
|
||||
if (($bprecord && !$bprecord->visible) || !has_capability('moodle/block:view', $context)) {
|
||||
send_file_not_found();
|
||||
|
||||
Reference in New Issue
Block a user