MDL-33022 mod_form: set correct groupid when editing an existing post
This commit is contained in:
committed by
Dan Poltawski
parent
55a568fa7d
commit
a024301750
@@ -627,6 +627,9 @@ if ($fromform = $mform_post->get_data()) {
|
||||
|
||||
// If the user has access to all groups and they are changing the group, then update the post.
|
||||
if ($contextcheck) {
|
||||
if (empty($fromform->groupinfo)) {
|
||||
$fromform->groupinfo = -1;
|
||||
}
|
||||
$DB->set_field('forum_discussions' ,'groupid' , $fromform->groupinfo, array('firstpost' => $fromform->id));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user