mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
An initial effort at making posts return to correct context
This commit is contained in:
parent
0650989c76
commit
b22b0e61f0
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user