Commit d1c46ead authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#187391 by jrbeeman, catch: redirect user to proper node comment page after...

#187391 by jrbeeman, catch: redirect user to proper node comment page after submitting a new comment
parent 207e6f14
......@@ -1444,7 +1444,9 @@ function _comment_form_submit(&$comment_values) {
function comment_form_submit($form, &$form_state) {
_comment_form_submit($form_state['values']);
if ($cid = comment_save($form_state['values'])) {
$form_state['redirect'] = array('node/'. $form_state['values']['nid'], NULL, "comment-$cid");
$node = node_load($form_state['values']['nid']);
$page = comment_new_page_count($node->comment_count, 1, $node);
$form_state['redirect'] = array('node/'. $node->nid, $page, "comment-$cid");
return;
}
}
......
Supports Markdown
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