Browse files

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

  • Loading branch information...
1 parent dd9274c commit 9d94aa31546faf56dbe40f6d12494201b4a50699 @danmarsden danmarsden committed with danpoltawski May 16, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 mod/forum/post.php
View
3 mod/forum/post.php
@@ -625,6 +625,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 9d94aa3

Please sign in to comment.