MDL-68435 customfield: fix plugin file serving callbacks.

Incorrect parameter/method call was previously serving files with
wrong filenames.
This commit is contained in:
Paul Holden
2023-09-04 10:45:22 +01:00
parent 094b78764f
commit 69bb59b9fe
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -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);
}
+1 -2
View File
@@ -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);
}