Permalink
Browse files

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

  • Loading branch information...
1 parent 6975216 commit c91dc553e5f58660a5e758a9e21213b4b146e1ba @danmarsden danmarsden committed with danpoltawski May 16, 2012
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 c91dc55

Please sign in to comment.