Commit c629c7bd authored by Dries's avatar Dries

- Fixed bug #4080: comments shown against wrong node. Reported by chrish.

parent df447293
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment