Merge branch 'MDL-56602-master-upgrade' of git://github.com/andrewnicols/moodle

This commit is contained in:
Dan Poltawski 2016-11-11 10:22:20 +00:00
commit e9eec33560
4 changed files with 12 additions and 58 deletions

View file

@ -315,6 +315,11 @@ if (!$cache and $version > $CFG->version) { // upgrade
$testsite = 'behat';
}
if (isset($CFG->themerev)) {
// Store the themerev to restore after purging caches.
$themerev = $CFG->themerev;
}
// We purge all of MUC's caches here.
// Caches are disabled for upgrade by CACHE_DISABLE_ALL so we must set the first arg to true.
// This ensures a real config object is loaded and the stores will be purged.
@ -324,6 +329,11 @@ if (!$cache and $version > $CFG->version) { // upgrade
// We then purge the regular caches.
purge_all_caches();
if (isset($themerev)) {
// Restore the themerev
set_config('themerev', $themerev);
}
$output = $PAGE->get_renderer('core', 'admin');
if (upgrade_stale_php_files_present()) {