mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Merge branch 'MDL-37797' of git://github.com/rwijaya/moodle
This commit is contained in:
commit
acd561c66a
1 changed files with 1 additions and 1 deletions
|
@ -4290,7 +4290,7 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
|
||||||
send_file_not_found();
|
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
|
// 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)) {
|
if (($bprecord && !$bprecord->visible) || !has_capability('moodle/block:view', $context)) {
|
||||||
send_file_not_found();
|
send_file_not_found();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue