Skip to content

Commit

Permalink
MDL-22622 Reset caches before and after the core upgrade. Seems to fi…
Browse files Browse the repository at this point in the history
…x the problems we were having.
  • Loading branch information
moodler committed May 31, 2010
1 parent cebb75a commit dcf9be7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,10 @@ function upgrade_core($version, $verbose) {
require_once($CFG->libdir.'/db/upgrade.php'); // Defines upgrades

try {
// Reset caches before any output
upgrade_reset_caches();
remove_dir($CFG->dataroot . '/cache', true); // flush cache

// Upgrade current language pack if we can
if (empty($CFG->skiplangupgrade)) {
upgrade_language_pack(false);
Expand Down Expand Up @@ -1246,6 +1250,7 @@ function upgrade_core($version, $verbose) {
events_update_definition('moodle');
message_update_providers('moodle');

// Reset caches again, just to be sure
upgrade_reset_caches();
remove_dir($CFG->dataroot . '/cache', true); // flush cache

Expand Down

0 comments on commit dcf9be7

Please sign in to comment.