An initial effort at making posts return to correct context

This commit is contained in:
moodler 2003-06-20 06:35:09 +00:00
parent 0650989c76
commit b22b0e61f0
2 changed files with 5 additions and 2 deletions

View File

@ -857,6 +857,7 @@ function forum_make_mail_post(&$post, $user, $touser, $course,
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 {

View File

@ -38,7 +38,7 @@
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);
@ -55,7 +55,7 @@
$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);
@ -180,6 +180,7 @@
}
forum_set_return();
unset($SESSION->fromdiscussion);
} else if (isset($edit)) { // User is editing their own post
@ -215,6 +216,7 @@
$post->forum = $forum->id;
forum_set_return();
unset($SESSION->fromdiscussion);
} else if (isset($delete)) { // User is deleting a post