mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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
1 changed files with 22 additions and 0 deletions
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;
|
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.
|
* Checks to make sure that the path for the file cache exists.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue