- Patch #372414 by Todd Nienkerk, JohnAlbin: don't output empty comments.
parent
4d2072c958
commit
562f0ae344
|
|
@ -1197,8 +1197,10 @@ function comment_render($node, $cid = 0) {
|
||||||
if (user_access('post comments') && $node->comment == COMMENT_NODE_OPEN && (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_BELOW) && !$reply) {
|
if (user_access('post comments') && $node->comment == COMMENT_NODE_OPEN && (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_BELOW) && !$reply) {
|
||||||
$output .= comment_form_box(array('nid' => $nid), t('Post new comment'));
|
$output .= comment_form_box(array('nid' => $nid), t('Post new comment'));
|
||||||
}
|
}
|
||||||
|
if ($output) {
|
||||||
$output = theme('comment_wrapper', $output, $node);
|
$output = theme('comment_wrapper', $output, $node);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue