summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-04-27 07:09:58 +0000
committerDries Buytaert <dries@buytaert.net>2009-04-27 07:09:58 +0000
commitb9f60c75a7ef93382ce7275a3a6d8d4be6e542a5 (patch)
tree1c6cfbafd59d1d514e66ab29c8b0a567fdc7d1bd /modules
parent18117a43f4cbc7bac9821db76432d0482886b0ff (diff)
downloadbrdo-b9f60c75a7ef93382ce7275a3a6d8d4be6e542a5.tar.gz
brdo-b9f60c75a7ef93382ce7275a3a6d8d4be6e542a5.tar.bz2
- Patch #353328 by brianV, catch: fixed glitch in comment paging.
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/comment.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 74f6c21b2..395d84221 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -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;
}