Skip to content
Browse files

MDL-23905 fix regression in mod_resource pluginfile.php migration

  • Loading branch information...
1 parent 8aff157 commit d57a4621038204ee906a743a7f068b058d26179b @ashleyholman ashleyholman committed Aug 25, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/resource/lib.php
View
2 mod/resource/lib.php
@@ -385,7 +385,7 @@ function resource_pluginfile($course, $cm, $context, $filearea, $args, $forcedow
$relativepath = implode('/', $args);
$fullpath = "/$context->id/mod_resource/$filearea/0/$relativepath";
if (!$file = $fs->get_file_by_hash(sha1($fullpath)) or $file->is_directory()) {
- $resource = $DB->get_record('resource', array('id'=>$cminfo->instance), 'id, legacyfiles', MUST_EXIST);
+ $resource = $DB->get_record('resource', array('id'=>$cm->instance), 'id, legacyfiles', MUST_EXIST);
if ($resource->legacyfiles != RESOURCELIB_LEGACYFILES_ACTIVE) {
return false;
}

0 comments on commit d57a462

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