mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-62571 mod_forum: fixed redirection URLs
This commit is contained in:
parent
50e48a8f2d
commit
4626c848c2
@ -350,7 +350,7 @@ if (!empty($forum)) { // User is starting a new discussion in a forum
|
||||
$event->add_record_snapshot('forum_discussions', $discussion);
|
||||
$event->trigger();
|
||||
|
||||
redirect("view.php?f=$discussion->forum");
|
||||
redirect(new moodle_url('/mod/forum/view.php', ['f' => $discussion->forum]));
|
||||
|
||||
} else if (forum_delete_post($post, has_capability('mod/forum:deleteanypost', $modcontext),
|
||||
$course, $cm, $forum)) {
|
||||
@ -845,7 +845,7 @@ if ($mform_post->is_cancelled()) {
|
||||
|
||||
} else { // Adding a new discussion.
|
||||
// The location to redirect to after successfully posting.
|
||||
$redirectto = new moodle_url('view.php', array('f' => $fromform->forum));
|
||||
$redirectto = new moodle_url('/mod/forum/view.php', array('f' => $fromform->forum));
|
||||
|
||||
$fromform->mailnow = empty($fromform->mailnow) ? 0 : 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user