mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-52217 repository: prepare_file should use per-request directory
The repository API defaults has a function, prepare_file, which is responsible for creating a unique file to be used during the current request. This is usually used in the repository's get_file() function to store the file before it is used elsewhere in the API to save the file to the filestorage API. It is also sometimes used to temporarily store credentials for the lifetime of the session. In all cases, this file is only expected to exist for the duration of the session. Switching to use of a per-request directory using make_request_directory() ensures that the tempdir does not grow without control. This commit also adds an upgrade step to remove all old temp directories created by any repository currently installed.
This commit is contained in:
parent
2f45a11ac4
commit
a9e12347b7
4 changed files with 30 additions and 8 deletions
|
@ -29,7 +29,7 @@
|
|||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2016021100.00; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
$version = 2016021500.00; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue