MDL-83570 tiny_recordrtc: Use the correct upgrade_plugin_savepoint()

And move the release upgrade line comment before the upgrade step.
This commit is contained in:
Jun Pataleta 2024-11-20 18:02:09 +08:00
parent 3b2311a4c3
commit 7f122657cf
No known key found for this signature in database
GPG Key ID: F83510526D99E2C7

View File

@ -45,6 +45,8 @@ function xmldb_tiny_recordrtc_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2024042400, 'tiny', 'recordrtc');
}
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2024112000) {
// The input bitrate to be converted.
$currentbitrate = get_config('tiny_recordrtc', 'audiobitrate');
@ -59,12 +61,8 @@ function xmldb_tiny_recordrtc_upgrade($oldversion) {
// Update the bitrate setting with the nearest supported bitrate.
set_config('audiobitrate', $nearestbitrate, 'tiny_recordrtc');
// Main savepoint reached.
upgrade_main_savepoint(true, 2024112000);
upgrade_plugin_savepoint(true, 2024112000, 'tiny', 'recordrtc');
}
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}