From 65179cec293159ee9c8ced58d3461845c71bcbaf Mon Sep 17 00:00:00 2001 From: shish Date: Sat, 27 Oct 2007 23:33:43 +0000 Subject: [PATCH] pull [578] from trunk git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.1@579 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/comment/theme.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ext/comment/theme.php b/ext/comment/theme.php index d91a0276..0b7793fe 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -37,7 +37,7 @@ class CommentListTheme extends Themelet { } /* - * + * Show comments for an image */ public function display_comments($page, $comments, $postbox, $image_id) { if($postbox) { @@ -46,13 +46,16 @@ class CommentListTheme extends Themelet { $this->build_postbox($image_id), "main", 30)); } else { - $page->add_block(new Block("Comments", - $this->comments_to_html($comments), "main", 30)); + if(count($comments) > 0) { + $page->add_block(new Block("Comments", + $this->comments_to_html($comments), "main", 30)); + } } } /* - * + * Add a block with thumbnail and comments, as part of the comment + * list page */ public function add_comment_list($page, $image, $comments, $position, $with_postbox) { $html = "
"; @@ -63,7 +66,8 @@ class CommentListTheme extends Themelet { $html .= "
".($this->build_postbox($image->id))."
"; } else { - $html .= "

You need to create an account before you can comment

"; + // $html .= "

You need to create an account before you can comment

"; + $html .= "

 

"; } $page->add_block(new Block("{$image->id}: ".($image->get_tag_list()), $html, "main", $position));