Commit b9f60c75 authored by Dries's avatar Dries

- Patch #353328 by brianV, catch: fixed glitch in comment paging.

parent 18117a43
......@@ -1768,7 +1768,9 @@ function comment_form_submit($form, &$form_state) {
_comment_form_submit($form_state['values']);
if ($cid = comment_save($form_state['values'])) {
$node = node_load($form_state['values']['nid']);
$page = comment_new_page_count($node->comment_count, 1, $node);
// Add 1 to existing $node->comment count to include new comment.
$comment_count = $node->comment_count + 1;
$page = comment_new_page_count($comment_count, 1, $node);
$form_state['redirect'] = array('node/' . $node->nid, $page, "comment-$cid");
return;
}
......
Markdown is supported
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