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(isset($_POST['image_id']) && isset($_POST['comment'])) {
|
||||
try {
|
||||
$i_iid = int_escape($_POST['image_id']);
|
||||
$cpe = new CommentPostingEvent($_POST['image_id'], $user, $_POST['comment']);
|
||||
send_event($cpe);
|
||||
$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) {
|
||||
$this->theme->display_error(403, "Comment Blocked", $ex->getMessage());
|
||||
|
Loading…
x
Reference in New Issue
Block a user