Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-25176 forum Redirects for new discussions shouldn't use SESSION

Unset the session->fromdiscussion var, because we know that the correct
path will be computed later.
  • Loading branch information...
commit 86eec9b429a6ac32bae1d78b4eb5719b36c08a54 1 parent c777836
@merrill-oakland merrill-oakland authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/forum/post.php
View
6 mod/forum/post.php
@@ -152,7 +152,8 @@
$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
@@ -227,6 +228,7 @@
$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
@@ -277,9 +279,9 @@
$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)) {
Please sign in to comment.
Something went wrong with that request. Please try again.