home » zplus/freepost.git
Author zPlus <-> 2017-03-27 20:07:17
Committer zPlus <-> 2017-03-27 20:07:17
Commit 82ec0d0 (patch)
Tree 6b5ff09
Parent(s)

Fix #36 Change redirect after new comment (on a post)


commits diff: 7431799..82ec0d0
1 file changed, 2 insertions, 2 deletionsdownload


Diffstat
-rw-r--r-- post.php 4

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+2/-2 M   post.php
index 2be025e..ad3f4d7
old size: 3K - new size: 3K
@@ -45,7 +45,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
45 45 // Everything seems OK, add the new comment
46 46 $post_hash_id = $_GET['hash_id'];
47 47
48 - $db->new_comment ($comment, $post_hash_id, Session::get_userid());
48 + $comment_hash_id = $db->new_comment ($comment, $post_hash_id, Session::get_userid());
49 49
50 50 /* Send email notification for the new comment
51 51 * $post_op is the post's original poster
@@ -67,7 +67,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
67 67 }
68 68 */
69 69
70 - header ('Location: ./' . $post_hash_id);
70 + header ('Location: ./' . $post_hash_id . '#comment-' . $comment_hash_id);
71 71
72 72 exit ();
73 73 }