Permalink
Browse files

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

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

0 comments on commit ffad867

Please sign in to comment.