From c629c7bd09397c315487bf0486af2c497a742d44 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 12 Nov 2003 12:24:01 +0000 Subject: - Fixed bug #4080: comments shown against wrong node. Reported by chrish. --- modules/comment.module | 13 ++++++------- modules/comment/comment.module | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) (limited to 'modules') diff --git a/modules/comment.module b/modules/comment.module index d6bc2457f..b75d4c2cf 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -568,6 +568,12 @@ function comment_render($node, $cid = 0) { if (user_access("access comments")) { + /* + ** Save were we come from so we can go back after a reply + */ + + comment_referer_save(); + /* ** Pre-process variables: */ @@ -776,12 +782,6 @@ function comment_render($node, $cid = 0) { if (user_access("post comments") && node_comment_mode($nid) == 2 && variable_get("comment_form_location", 0)) { print theme("box", t("Post new comment"), comment_form(array("nid" => $nid))); } - - /* - ** Save were we come from so we can go back after a reply - */ - - comment_referer_save(); } } @@ -911,7 +911,6 @@ function comment_page() { $comments_per_page = $_POST["comments_per_page"]; comment_save_settings(check_query($mode), check_query($order), check_query($threshold), check_query($comments_per_page)); - //drupal_goto(url(comment_referer_load(), "mode=$mode&order=$order&threshold=$threshold&comments_per_page=$comments_per_page")); drupal_goto(url(comment_referer_load())); break; } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index d6bc2457f..b75d4c2cf 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -568,6 +568,12 @@ function comment_render($node, $cid = 0) { if (user_access("access comments")) { + /* + ** Save were we come from so we can go back after a reply + */ + + comment_referer_save(); + /* ** Pre-process variables: */ @@ -776,12 +782,6 @@ function comment_render($node, $cid = 0) { if (user_access("post comments") && node_comment_mode($nid) == 2 && variable_get("comment_form_location", 0)) { print theme("box", t("Post new comment"), comment_form(array("nid" => $nid))); } - - /* - ** Save were we come from so we can go back after a reply - */ - - comment_referer_save(); } } @@ -911,7 +911,6 @@ function comment_page() { $comments_per_page = $_POST["comments_per_page"]; comment_save_settings(check_query($mode), check_query($order), check_query($threshold), check_query($comments_per_page)); - //drupal_goto(url(comment_referer_load(), "mode=$mode&order=$order&threshold=$threshold&comments_per_page=$comments_per_page")); drupal_goto(url(comment_referer_load())); break; } -- cgit v1.2.3