mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +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
094b78764f
commit
69bb59b9fe
2 changed files with 2 additions and 3 deletions
|
@ -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.
|
// 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.
|
// 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_stored_file($file, DAYSECS, 0, $forcedownload, $options);
|
||||||
send_file($file, 86400, 0, $forcedownload, $options);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue