Skip to content

Commit 4a4109e

Browse files
committed
Set correct default value for showrecent column.
1 parent 7f02637 commit 4a4109e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

db/upgrade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,17 @@ function xmldb_hsuforum_upgrade($oldversion) {
343343
upgrade_mod_savepoint(true, 2018120301, 'hsuforum');
344344
}
345345

346+
if ($oldversion < 2020073000) {
347+
// Set correct default value for showrecent column.
348+
$table = new xmldb_table('hsuforum');
349+
$field = new xmldb_field('showrecent', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '1', 'displaywordcount');
350+
if ($dbman->field_exists($table, $field)) {
351+
$dbman->change_field_default($table, $field);
352+
}
353+
// Open Forum savepoint reached.
354+
upgrade_mod_savepoint(true, 2020073000, 'hsuforum');
355+
}
356+
346357
return true;
347358
}
348359

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

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

30-
$plugin->version = 2020061100; // The current module version (Date: YYYYMMDDXX)
30+
$plugin->version = 2020073000; // The current module version (Date: YYYYMMDDXX)
3131
$plugin->requires = 2019111800; // Requires this Moodle version
3232
$plugin->component = 'mod_hsuforum'; // Full name of the plugin (used for diagnostics).
3333
$plugin->release = '3.8.3';

0 commit comments

Comments
 (0)