Skip to content

Commit

Permalink
Merge branch 'MDL-39602-24' of git://github.com/damyon/moodle into MO…
Browse files Browse the repository at this point in the history
…ODLE_24_STABLE
  • Loading branch information
Sam Hemelryk committed May 10, 2013
2 parents a327720 + aa6d532 commit e09afa5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cache/locallib.php
Expand Up @@ -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();
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit e09afa5

Please sign in to comment.