redirect to the bottom of the thread when commenting
This commit is contained in:
parent
833ef69ec4
commit
6222c0d093
@ -117,10 +117,11 @@ class CommentList extends Extension {
|
|||||||
if($event->get_arg(0) === "add") {
|
if($event->get_arg(0) === "add") {
|
||||||
if(isset($_POST['image_id']) && isset($_POST['comment'])) {
|
if(isset($_POST['image_id']) && isset($_POST['comment'])) {
|
||||||
try {
|
try {
|
||||||
|
$i_iid = int_escape($_POST['image_id']);
|
||||||
$cpe = new CommentPostingEvent($_POST['image_id'], $user, $_POST['comment']);
|
$cpe = new CommentPostingEvent($_POST['image_id'], $user, $_POST['comment']);
|
||||||
send_event($cpe);
|
send_event($cpe);
|
||||||
$page->set_mode("redirect");
|
$page->set_mode("redirect");
|
||||||
$page->set_redirect(make_link("post/view/".int_escape($_POST['image_id'])));
|
$page->set_redirect(make_link("post/view/$i_iid#comment_on_$i_iid"));
|
||||||
}
|
}
|
||||||
catch(CommentPostingException $ex) {
|
catch(CommentPostingException $ex) {
|
||||||
$this->theme->display_error(403, "Comment Blocked", $ex->getMessage());
|
$this->theme->display_error(403, "Comment Blocked", $ex->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user