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:12:18 +08:00
parent 5ae0bf0a12
commit 1be54667d6
No known key found for this signature in database
GPG Key ID: F83510526D99E2C7

View File

@ -45,6 +45,9 @@ 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 < 2024100701) {
// The input bitrate to be converted.
$currentbitrate = get_config('tiny_recordrtc', 'audiobitrate');
@ -59,12 +62,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, 2024100701);
upgrade_plugin_savepoint(true, 2024100701, 'tiny', 'recordrtc');
}
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}