mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-39602-master' of git://github.com/damyon/moodle
This commit is contained in:
commit
8b5647b8d7
12
cache/locallib.php
vendored
12
cache/locallib.php
vendored
@ -393,15 +393,9 @@ class cache_config_writer extends cache_config {
|
||||
* Returns a configuration array if it could not be saved. This is a bad situation. Check your error logs.
|
||||
*/
|
||||
public static function create_default_configuration($forcesave = false) {
|
||||
global $CFG;
|
||||
|
||||
// HACK ALERT.
|
||||
// We probably need to come up with a better way to create the default stores, or at least ensure 100% that the
|
||||
// default store plugins are protected from deletion.
|
||||
require_once($CFG->dirroot.'/cache/stores/file/lib.php');
|
||||
require_once($CFG->dirroot.'/cache/stores/session/lib.php');
|
||||
require_once($CFG->dirroot.'/cache/stores/static/lib.php');
|
||||
|
||||
$writer = new self;
|
||||
$writer->configstores = self::get_default_stores();
|
||||
$writer->configdefinitions = self::locate_definitions();
|
||||
@ -448,6 +442,12 @@ class cache_config_writer extends cache_config {
|
||||
* @return array
|
||||
*/
|
||||
protected static function get_default_stores() {
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->dirroot.'/cache/stores/file/lib.php');
|
||||
require_once($CFG->dirroot.'/cache/stores/session/lib.php');
|
||||
require_once($CFG->dirroot.'/cache/stores/static/lib.php');
|
||||
|
||||
return array(
|
||||
'default_application' => array(
|
||||
'name' => 'default_application',
|
||||
|
Loading…
x
Reference in New Issue
Block a user