Permalink
Browse files

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

  • Loading branch information...
danmarsden authored and danpoltawski committed May 16, 2012
1 parent 55a568f commit a02430175024b6b230ee00a9c65c819c72f8b39e
Showing with 3 additions and 0 deletions.
  1. +3 −0 mod/forum/post.php
View
@@ -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));
}

0 comments on commit a024301

Please sign in to comment.