From aa2696ca077a88bf973cb1fe33dee5fb59b637f0 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 6 Feb 2012 14:42:07 +0000 Subject: [PATCH] only add ellipsis if the comment actually is too long --- ext/comment/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 995744ee..08976d9d 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -140,7 +140,7 @@ class CommentListTheme extends Themelet { $h_name = html_escape($comment->owner_name); $h_poster_ip = html_escape($comment->poster_ip); $h_timestamp = autodate($comment->posted); - $h_comment = ($trim ? substr($tfe->stripped, 0, 50)."..." : $tfe->formatted); + $h_comment = ($trim ? substr($tfe->stripped, 0, 50) . (strlen($tfe->stripped) > 50 ? "..." : "") : $tfe->formatted); $i_comment_id = int_escape($comment->comment_id); $i_image_id = int_escape($comment->image_id);