Commit d4fe1b30 authored by jun's avatar jun
Browse files

MDL-75072 mod_forum: Drop usecoursefullname forum setting

parent 564d0d73
......@@ -338,5 +338,22 @@ function xmldb_forum_upgrade($oldversion) {
// Automatically generated Moodle v4.0.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2022062700) {
// Unset $CFG->forum_usecoursefullname.
unset_config('forum_usecoursefullname');
// Define field usecoursefullname to be dropped from forum.
$table = new xmldb_table('forum');
$field = new xmldb_field('usecoursefullname');
// Conditionally launch drop field usecoursefullname.
if ($dbman->field_exists($table, $field)) {
$dbman->drop_field($table, $field);
}
// Forum savepoint reached.
upgrade_mod_savepoint(true, 2022062700, 'forum');
}
return true;
}
......@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2022041900; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2022062700; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2022041200; // Requires this Moodle version.
$plugin->component = 'mod_forum'; // Full name of the plugin (used for diagnostics)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment