mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-22950 fixed regression - files in subdirectories not found; big thanks to Dongsheng for spotting this
This commit is contained in:
parent
c393165495
commit
d85ab7051c
2 changed files with 18 additions and 18 deletions
|
@ -38,7 +38,7 @@ function block_html_pluginfile($course, $birecord_or_cm, $context, $filearea, $a
|
|||
$fs = get_file_storage();
|
||||
|
||||
$filename = array_pop($args);
|
||||
$filepath = '/'.implode('/', $args);
|
||||
$filepath = $args ? '/'.implode('/', $args).'/' : '/';
|
||||
|
||||
if (!$file = $fs->get_file($context->id, 'block_html', 'content', 0, $filepath, $filename) or $file->is_directory()) {
|
||||
send_file_not_found();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue