Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-33022 mod_form: set correct groupid when editing an existing post

  • Loading branch information...
commit a02430175024b6b230ee00a9c65c819c72f8b39e 1 parent 55a568f
@danmarsden danmarsden authored danpoltawski committed
Showing with 3 additions and 0 deletions.
  1. +3 −0  mod/forum/post.php
View
3  mod/forum/post.php
@@ -627,6 +627,9 @@
// 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));
}
Please sign in to comment.
Something went wrong with that request. Please try again.