Commit 071d4b01 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#180559 by hunmonk: do not try to display the comment addition form at th end...

#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
parent 5686eea1
......@@ -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'));
}
......
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