MDL-72615 boxnet: Correct upgrade step for boxnet removal

This commit is contained in:
Andrew Nicols
2021-10-29 15:00:58 +08:00
parent f764fa8e62
commit d2d9d6087d
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -3040,7 +3040,7 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2021102600.01);
}
if ($oldversion < 2021102900.00) {
if ($oldversion < 2021102900.02) {
// If portfolio_boxnet is no longer present, remove it.
if (!file_exists($CFG->dirroot . '/portfolio/boxnet/version.php')) {
$instance = $DB->get_record('portfolio_instance', ['plugin' => 'boxnet']);
@@ -3076,11 +3076,14 @@ function xmldb_main_upgrade($oldversion) {
// Clean config.
unset_all_config_for_plugin('repository_boxnet');
// The boxnet repository plugin stores some config in 'boxnet' incorrectly.
unset_all_config_for_plugin('boxnet');
// Remove orphaned files.
upgrade_delete_orphaned_file_records();
}
upgrade_main_savepoint(true, 2021102900.00);
upgrade_main_savepoint(true, 2021102900.02);
}
return true;
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2021102900.01; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2021102900.02; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.0dev+ (Build: 20211026)'; // Human-friendly version name