Commit 6e16b6c5 authored by jcnventura's avatar jcnventura

Issue #1521238: remove warning when comment printing is enabled, for node...

Issue #1521238: remove warning when comment printing is enabled, for node types that don't have comments on.
parent 7f91e9bf
......@@ -533,12 +533,16 @@ function _print_generate_node($nid, $cid = NULL, $format = PRINT_HTML_FORMAT, $t
// Print only the requested comment (or if $cid is NULL, all of them)
$comments = comment_node_page_additions($node);
unset($comments['comment_form']);
foreach ($comments['comments'] as &$comment) {
unset($comment['links']);
}
if (!empty($comments)) {
unset($comments['comment_form']);
foreach ($comments['comments'] as $key => &$comment) {
if (is_numeric($key)) {
unset($comment['links']);
}
}
$build['comments'] = $comments;
$build['comments'] = $comments;
}
}
$build += array(
......
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