Skip to content

Set correct default value for showrecent column. #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,17 @@ function xmldb_hsuforum_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2018120301, 'hsuforum');
}

if ($oldversion < 2021061100) {
// Set correct default value for showrecent column.
$table = new xmldb_table('hsuforum');
$field = new xmldb_field('showrecent', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '1', 'displaywordcount');
if ($dbman->field_exists($table, $field)) {
$dbman->change_field_default($table, $field);
}
// Open Forum savepoint reached.
upgrade_mod_savepoint(true, 2021061100, 'hsuforum');
}

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2021060100; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2021061100; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2020110900; // Requires this Moodle version
$plugin->component = 'mod_hsuforum'; // Full name of the plugin (used for diagnostics).
$plugin->release = '3.10.3';
Expand Down