mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-68435 customfield: fix plugin file serving callbacks.
Incorrect parameter/method call was previously serving files with wrong filenames.
This commit is contained in:
parent
206c3a66e7
commit
08e66a5691
@ -72,5 +72,5 @@ function customfield_textarea_pluginfile($course, $cm, $context, $filearea, $arg
|
||||
}
|
||||
|
||||
// We can now send the file back to the browser - in this case with a cache lifetime of 1 day and no filtering.
|
||||
send_file($file, 86400, 0, $forcedownload, $options);
|
||||
send_stored_file($file, DAYSECS, 0, $forcedownload, $options);
|
||||
}
|
||||
|
@ -82,6 +82,5 @@ function core_customfield_pluginfile($course, $cm, $context, $filearea, $args, $
|
||||
}
|
||||
|
||||
// We can now send the file back to the browser - in this case with a cache lifetime of 1 day and no filtering.
|
||||
// From Moodle 2.3, use send_stored_file instead.
|
||||
send_file($file, 86400, 0, $forcedownload, $options);
|
||||
send_stored_file($file, DAYSECS, 0, $forcedownload, $options);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user