Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-39602-24' of git://github.com/damyon/moodle into MO…

…ODLE_24_STABLE
  • Loading branch information...
commit e09afa518415463d452a0bea399a7f571805cde0 2 parents a327720 + aa6d532
@samhemelryk samhemelryk authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 cache/locallib.php
View
12 cache/locallib.php
@@ -330,15 +330,9 @@ public function delete_store_instance($name) {
* 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() {
- 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();
@@ -385,6 +379,12 @@ public static function create_default_configuration() {
* @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',
Please sign in to comment.
Something went wrong with that request. Please try again.