MDL-68435 customfield: fix plugin file serving callbacks.
Incorrect parameter/method call was previously serving files with wrong filenames.
This commit is contained in:
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user