mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-16596 always force download of draft files - this prevents problems when editing area with file suploaded by otehr users
This commit is contained in:
parent
ae6bc29505
commit
ac84a07da8
@ -12,7 +12,6 @@
|
||||
disable_debugging();
|
||||
|
||||
$relativepath = get_file_argument('draftfile.php');
|
||||
$forcedownload = optional_param('forcedownload', 0, PARAM_BOOL);
|
||||
|
||||
// relative path must start with '/'
|
||||
if (!$relativepath) {
|
||||
@ -64,4 +63,4 @@
|
||||
// finally send the file
|
||||
// ========================================
|
||||
session_write_close(); // unlock session during fileserving
|
||||
send_stored_file($file, 0, false, $forcedownload);
|
||||
send_stored_file($file, 0, false, true); // force download - security first!
|
||||
|
Loading…
x
Reference in New Issue
Block a user