Skip to content

Commit

Permalink
MDL-33022 mod_form: set correct groupid when editing an existing post
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden authored and danpoltawski committed Aug 2, 2012
1 parent 55a568f commit a024301
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mod/forum/post.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@


// If the user has access to all groups and they are changing the group, then update the post. // If the user has access to all groups and they are changing the group, then update the post.
if ($contextcheck) { if ($contextcheck) {
if (empty($fromform->groupinfo)) {
$fromform->groupinfo = -1;
}
$DB->set_field('forum_discussions' ,'groupid' , $fromform->groupinfo, array('firstpost' => $fromform->id)); $DB->set_field('forum_discussions' ,'groupid' , $fromform->groupinfo, array('firstpost' => $fromform->id));
} }


Expand Down

0 comments on commit a024301

Please sign in to comment.