mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'm24_MDL-36360_Missing_cachestore_file_config_get_configuration_array' of git://github.com/scara/moodle
This commit is contained in:
commit
70cb1b995b
22
cache/stores/file/lib.php
vendored
22
cache/stores/file/lib.php
vendored
@ -456,6 +456,28 @@ class cachestore_file implements cache_store, cache_is_key_aware {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given the data from the add instance form this function creates a configuration array.
|
||||
*
|
||||
* @param stdClass $data
|
||||
* @return array
|
||||
*/
|
||||
public static function config_get_configuration_array($data) {
|
||||
$config = array();
|
||||
|
||||
if (isset($data->path)) {
|
||||
$config['path'] = $data->path;
|
||||
}
|
||||
if (isset($data->autocreate)) {
|
||||
$config['autocreate'] = $data->autocreate;
|
||||
}
|
||||
if (isset($data->prescan)) {
|
||||
$config['prescan'] = $data->prescan;
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to make sure that the path for the file cache exists.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user