function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link=false, $rate=false, $footer="") {
global $THEME, $USER, $CFG;
+ echo "<a name=\"$post->id\"></a>";
if ($post->parent) {
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 CLASS=\"forumpost\">";
} else {
if ($subscribemessage = forum_post_subscription($post)) {
$timemessage = 2;
}
- redirect(forum_go_back_to("discuss.php?d=$post->discussion"), $message.$subscribemessage, $timemessage);
+ redirect(forum_go_back_to("discuss.php?d=$post->discussion#$post->id"), $message.$subscribemessage, $timemessage);
} else {
error(get_string("couldnotupdate", "forum"), $errordestination);
$timemessage = 4;
}
- redirect(forum_go_back_to("discuss.php?d=$post->discussion"), $message.$subscribemessage, $timemessage);
+ redirect(forum_go_back_to("discuss.php?d=$post->discussion#$post->id"), $message.$subscribemessage, $timemessage);
} else {
error(get_string("couldnotadd", "forum"), $errordestination);
}
forum_set_return();
+ unset($SESSION->fromdiscussion);
} else if (isset($edit)) { // User is editing their own post
$post->forum = $forum->id;
forum_set_return();
+ unset($SESSION->fromdiscussion);
} else if (isset($delete)) { // User is deleting a post