From 46a6e08ceaa2fee6d0fbae3435036f91289d5a3e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 1 Dec 2006 16:50:36 +0000 Subject: - Patch #51314 by kjartan, eafarris, et al: hide the last comment block if there are no comments. --- modules/comment/comment.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index ee29f3a89..41abf8595 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -178,7 +178,9 @@ function theme_comment_block() { while ($comment = db_fetch_object($result)) { $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .'
'. t('@time ago', array('@time' => format_interval(time() - $comment->timestamp))); } - return theme('item_list', $items); + if ($items) { + return theme('item_list', $items); + } } /** -- cgit v1.2.3