Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 mod/forum/post.php
6 mod/forum/post.php
@@ -152,7 +152,8 @@
152 152 $post->groupid = groups_get_activity_group($cm);
153 153 }
154 154
155   - forum_set_return();
  155 + // Unsetting this will allow the correct return URL to be calculated later.
  156 + unset($SESSION->fromdiscussion);
156 157
157 158 } else if (!empty($reply)) { // User is writing a new reply
158 159
@@ -227,6 +228,7 @@
227 228 $post->subject = $strre.' '.$post->subject;
228 229 }
229 230
  231 + // Unsetting this will allow the correct return URL to be calculated later.
230 232 unset($SESSION->fromdiscussion);
231 233
232 234 } else if (!empty($edit)) { // User is editing their own post
@@ -277,9 +279,9 @@
277 279
278 280 $post = trusttext_pre_edit($post, 'message', $modcontext);
279 281
  282 + // Unsetting this will allow the correct return URL to be calculated later.
280 283 unset($SESSION->fromdiscussion);
281 284
282   -
283 285 }else if (!empty($delete)) { // User is deleting a post
284 286
285 287 if (! $post = forum_get_post_full($delete)) {

0 comments on commit 86eec9b

Please sign in to comment.
Something went wrong with that request. Please try again.