MDL-51939 mod_forum: Correct empty groupinfo check
This commit is contained in:
@@ -240,5 +240,13 @@ function xmldb_forum_upgrade($oldversion) {
|
||||
// Moodle v2.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2014111002) {
|
||||
// Groupid = 0 is never valid.
|
||||
$DB->set_field('forum_discussions', 'groupid', -1, array('groupid' => 0));
|
||||
|
||||
// Forum savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2014111002, 'forum');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -840,7 +840,7 @@ if ($mform_post->is_cancelled()) {
|
||||
// Before we add this we must check that the user will not exceed the blocking threshold.
|
||||
forum_check_blocking_threshold($thresholdwarning);
|
||||
|
||||
if (isset($fromform->groupinfo)) {
|
||||
if (!empty($fromform->groupinfo)) {
|
||||
// Use the value provided in the dropdown group selection.
|
||||
$fromform->groupid = $fromform->groupinfo;
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2014111001; // The current module version (Date: YYYYMMDDXX)
|
||||
$plugin->version = 2014111002; // The current module version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2014110400; // Requires this Moodle version
|
||||
$plugin->component = 'mod_forum'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
Reference in New Issue
Block a user