diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-03 17:59:50 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-03 17:59:50 +0000 |
commit | 071d4b010e4e4a67db0231cf94c5eb2a627d1514 (patch) | |
tree | a8d055080f4968814383f918ce584a39b0372bca /modules/comment | |
parent | 5686eea147e4e67cd627bc06a0d2785e0ac58f7e (diff) | |
download | brdo-071d4b010e4e4a67db0231cf94c5eb2a627d1514.tar.gz brdo-071d4b010e4e4a67db0231cf94c5eb2a627d1514.tar.bz2 |
#180559 by hunmonk: do not try to display the comment addition form at th end of comments, if we are already on the page, so it is displayed anyway
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 94d773798..e95faf365 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1120,8 +1120,9 @@ function comment_render($node, $cid = 0) { } } - // If enabled, show new comment form. - if (user_access('post comments') && node_comment_mode($nid) == COMMENT_NODE_READ_WRITE && (variable_get('comment_form_location', COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_BELOW)) { + // If enabled, show new comment form if it's not already being displayed. + $reply = arg(0) == 'comment' && arg(1) == 'reply'; + if (user_access('post comments') && node_comment_mode($nid) == COMMENT_NODE_READ_WRITE && (variable_get('comment_form_location', COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_BELOW) && !$reply) { $output .= comment_form_box(array('nid' => $nid), t('Post new comment')); } |