mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Merge branch 'wip-MDL-39526-m25' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
887e724796
8 changed files with 66 additions and 35 deletions
|
@ -1391,9 +1391,6 @@ function get_config($plugin, $name = NULL) {
|
|||
// install the database.
|
||||
$siteidentifier = $DB->get_field('config', 'value', array('name' => 'siteidentifier'));
|
||||
} catch (dml_exception $ex) {
|
||||
// It's failed. We'll use this opportunity to disable cache stores so that we don't inadvertingly start using
|
||||
// old caches. People should delete their moodledata dirs when reinstalling the database... but they don't.
|
||||
cache_factory::disable_stores();
|
||||
// Set siteidentifier to false. We don't want to trip this continually.
|
||||
$siteidentifier = false;
|
||||
throw $ex;
|
||||
|
|
|
@ -486,7 +486,7 @@ 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);
|
||||
|
||||
|
@ -519,7 +519,7 @@ 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);
|
||||
|
||||
|
@ -1467,10 +1467,6 @@ function install_core($version, $verbose) {
|
|||
remove_dir($CFG->dataroot.'/muc', true);
|
||||
|
||||
try {
|
||||
// Disable the use of cache stores here. We will reset the factory after we've performed the installation.
|
||||
// This ensures that we don't permanently cache anything during installation.
|
||||
cache_factory::disable_stores();
|
||||
|
||||
set_time_limit(600);
|
||||
print_upgrade_part_start('moodle', true, $verbose); // does not store upgrade running flag
|
||||
|
||||
|
@ -1519,9 +1515,7 @@ function upgrade_core($version, $verbose) {
|
|||
try {
|
||||
// Reset caches before any output
|
||||
purge_all_caches();
|
||||
// Disable the use of cache stores here. We will reset the factory after we've performed the installation.
|
||||
// This ensures that we don't permanently cache anything during installation.
|
||||
cache_factory::disable_stores();
|
||||
cache_helper::purge_all(true);
|
||||
|
||||
// Upgrade current language pack if we can
|
||||
upgrade_language_pack();
|
||||
|
@ -1552,8 +1546,6 @@ function upgrade_core($version, $verbose) {
|
|||
// Update core definitions.
|
||||
cache_helper::update_definitions(true);
|
||||
|
||||
// Reset the cache, this returns it to a normal operation state.
|
||||
cache_factory::reset();
|
||||
// Purge caches again, just to be sure we arn't holding onto old stuff now.
|
||||
purge_all_caches();
|
||||
|
||||
|
@ -1582,10 +1574,6 @@ function upgrade_noncore($verbose) {
|
|||
|
||||
// upgrade all plugins types
|
||||
try {
|
||||
// Disable the use of cache stores here.
|
||||
// We don't reset this, the site can live without proper caching for life of this request.
|
||||
cache_factory::disable_stores();
|
||||
|
||||
$plugintypes = get_plugin_types();
|
||||
foreach ($plugintypes as $type=>$location) {
|
||||
upgrade_plugins($type, 'print_upgrade_part_start', 'print_upgrade_part_end', $verbose);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue