X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=mod%2Fforum%2Fpost.php;h=e3d3decf29faeb600b0a068a91a2222488b274f9;hp=6f39445a10d058badc6eaff099edbca37e833a8d;hb=46691973b3b02ce187eaab8562650a754521d673;hpb=d45e65ccadbf4097a970655941ac1c5cae17f26d diff --git a/mod/forum/post.php b/mod/forum/post.php index 6f39445a10d..e3d3decf29f 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -152,7 +152,8 @@ if (!empty($forum)) { // User is starting a new discussion in a forum $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 @@ if (!empty($forum)) { // User is starting a new discussion in a forum $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 @@ if (!empty($forum)) { // User is starting a new discussion in a forum $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)) {