From 82ec0d0715d0507bea29f4a85fdf6d272591cb01 Mon Sep 17 00:00:00 2001 From: zPlus <-> Date: Mon, 27 Mar 2017 22:07:17 +0200 Subject: [PATCH] Fix #36 Change redirect after new comment (on a post) --- post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post.php b/post.php index 2be025e3..ad3f4d7b 100644 --- a/post.php +++ b/post.php @@ -45,7 +45,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') // Everything seems OK, add the new comment $post_hash_id = $_GET['hash_id']; - $db->new_comment ($comment, $post_hash_id, Session::get_userid()); + $comment_hash_id = $db->new_comment ($comment, $post_hash_id, Session::get_userid()); /* Send email notification for the new comment * $post_op is the post's original poster @@ -67,7 +67,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') } */ - header ('Location: ./' . $post_hash_id); + header ('Location: ./' . $post_hash_id . '#comment-' . $comment_hash_id); exit (); }