mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-23905 fix regression in mod_resource pluginfile.php migration
This commit is contained in:
parent
8aff1574dc
commit
d57a462103
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user