Merge branch 'w33_MDL-41094_m26_purgecleanup' of https://github.com/skodak/moodle
This commit is contained in:
+12
-12
@@ -488,8 +488,6 @@ function upgrade_plugins($type, $startcallback, $endcallback, $verbose) {
|
||||
message_update_processors($plug);
|
||||
}
|
||||
upgrade_plugin_mnet_functions($component);
|
||||
cache_helper::purge_all(true);
|
||||
purge_all_caches();
|
||||
$endcallback($component, true, $verbose);
|
||||
|
||||
} else if ($installedversion < $plugin->version) { // upgrade
|
||||
@@ -521,8 +519,6 @@ function upgrade_plugins($type, $startcallback, $endcallback, $verbose) {
|
||||
message_update_processors($plug);
|
||||
}
|
||||
upgrade_plugin_mnet_functions($component);
|
||||
cache_helper::purge_all(true);
|
||||
purge_all_caches();
|
||||
$endcallback($component, false, $verbose);
|
||||
|
||||
} else if ($installedversion > $plugin->version) {
|
||||
@@ -653,7 +649,6 @@ function upgrade_plugins_modules($startcallback, $endcallback, $verbose) {
|
||||
message_update_providers($component);
|
||||
upgrade_plugin_mnet_functions($component);
|
||||
|
||||
purge_all_caches();
|
||||
$endcallback($component, true, $verbose);
|
||||
|
||||
} else if ($currmodule->version < $module->version) {
|
||||
@@ -687,8 +682,6 @@ function upgrade_plugins_modules($startcallback, $endcallback, $verbose) {
|
||||
message_update_providers($component);
|
||||
upgrade_plugin_mnet_functions($component);
|
||||
|
||||
purge_all_caches();
|
||||
|
||||
$endcallback($component, false, $verbose);
|
||||
|
||||
} else if ($currmodule->version > $module->version) {
|
||||
@@ -844,7 +837,6 @@ function upgrade_plugins_blocks($startcallback, $endcallback, $verbose) {
|
||||
message_update_providers($component);
|
||||
upgrade_plugin_mnet_functions($component);
|
||||
|
||||
purge_all_caches();
|
||||
$endcallback($component, true, $verbose);
|
||||
|
||||
} else if ($currblock->version < $block->version) {
|
||||
@@ -877,7 +869,6 @@ function upgrade_plugins_blocks($startcallback, $endcallback, $verbose) {
|
||||
message_update_providers($component);
|
||||
upgrade_plugin_mnet_functions($component);
|
||||
|
||||
purge_all_caches();
|
||||
$endcallback($component, false, $verbose);
|
||||
|
||||
} else if ($currblock->version > $block->version) {
|
||||
@@ -1532,9 +1523,9 @@ function upgrade_core($version, $verbose) {
|
||||
require_once($CFG->libdir.'/db/upgrade.php'); // Defines upgrades
|
||||
|
||||
try {
|
||||
// Reset caches before any output
|
||||
purge_all_caches();
|
||||
// Reset caches before any output.
|
||||
cache_helper::purge_all(true);
|
||||
purge_all_caches();
|
||||
|
||||
// Upgrade current language pack if we can
|
||||
upgrade_language_pack();
|
||||
@@ -1566,8 +1557,8 @@ function upgrade_core($version, $verbose) {
|
||||
cache_helper::update_definitions(true);
|
||||
|
||||
// Purge caches again, just to be sure we arn't holding onto old stuff now.
|
||||
purge_all_caches();
|
||||
cache_helper::purge_all(true);
|
||||
purge_all_caches();
|
||||
|
||||
// Clean up contexts - more and more stuff depends on existence of paths and contexts
|
||||
context_helper::cleanup_instances();
|
||||
@@ -1594,6 +1585,10 @@ function upgrade_noncore($verbose) {
|
||||
|
||||
// upgrade all plugins types
|
||||
try {
|
||||
// Reset caches before any output.
|
||||
cache_helper::purge_all(true);
|
||||
purge_all_caches();
|
||||
|
||||
$plugintypes = core_component::get_plugin_types();
|
||||
foreach ($plugintypes as $type=>$location) {
|
||||
upgrade_plugins($type, 'print_upgrade_part_start', 'print_upgrade_part_end', $verbose);
|
||||
@@ -1602,6 +1597,11 @@ function upgrade_noncore($verbose) {
|
||||
cache_helper::update_definitions();
|
||||
// Mark the site as upgraded.
|
||||
set_config('allversionshash', core_component::get_all_versions_hash());
|
||||
|
||||
// Purge caches again, just to be sure we arn't holding onto old stuff now.
|
||||
cache_helper::purge_all(true);
|
||||
purge_all_caches();
|
||||
|
||||
} catch (Exception $ex) {
|
||||
upgrade_handle_exception($ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user