Skip to content
Browse files

Merge branch 'MDL-37797_m24' of git://github.com/rwijaya/moodle into …

…MOODLE_24_STABLE
  • Loading branch information...
2 parents dc85a9e + 3bcf80e commit 8b2034bc7b82033c2abcdad5e38443c40d35c846 @danpoltawski danpoltawski committed Feb 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/filelib.php
View
2 lib/filelib.php
@@ -4277,7 +4277,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();

0 comments on commit 8b2034b

Please sign in to comment.
Something went wrong with that request. Please try again.