$post->groupid = groups_get_activity_group($cm);
}
- forum_set_return();
+ // Unsetting this will allow the correct return URL to be calculated later.
+ unset($SESSION->fromdiscussion);
} else if (!empty($reply)) { // User is writing a new reply
$post->subject = $strre.' '.$post->subject;
}
+ // Unsetting this will allow the correct return URL to be calculated later.
unset($SESSION->fromdiscussion);
} else if (!empty($edit)) { // User is editing their own post
$post = trusttext_pre_edit($post, 'message', $modcontext);
+ // Unsetting this will allow the correct return URL to be calculated later.
unset($SESSION->fromdiscussion);
-
}else if (!empty($delete)) { // User is deleting a post
if (! $post = forum_get_post_full($delete)) {