MDL-77598 editor_tinymce: ensure sub-plugins are also uninstalled.

This commit is contained in:
Paul Holden 2023-03-10 16:37:32 +00:00
parent 61cd980fb7
commit 9bf8699b7c
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164
2 changed files with 15 additions and 1 deletions

View File

@ -3128,5 +3128,19 @@ privatefiles,moodle|/user/files.php';
upgrade_main_savepoint(true, 2023031000.01);
}
if ($oldversion < 2023031000.02) {
// If editor_tinymce is no longer present, remove it's sub-plugins too.
if (!file_exists($CFG->dirroot . '/lib/editor/tinymce/version.php')) {
$DB->delete_records_select(
'config_plugins',
$DB->sql_like('plugin', ':plugin'),
['plugin' => $DB->sql_like_escape('tinymce_') . '%']
);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2023031000.02);
}
return true;
}

View File

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2023031000.01; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2023031000.02; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.2dev (Build: 20230310)'; // Human-friendly version name