From 435accd92edf76acfc3f220a0ab68c58b2bb18c3 Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter Date: Wed, 3 Jan 2007 21:47:38 +0000 Subject: [PATCH] #104156, backport, Unnecessary function call in comment link --- modules/comment.module | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/comment.module b/modules/comment.module index e1da1ac97175..97c2a0248a9e 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -192,11 +192,12 @@ function comment_link($type, $node = 0, $main = 0) { if (user_access('access comments')) { $all = comment_num_all($node->nid); - $new = comment_num_new($node->nid); if ($all) { $links[] = l(format_plural($all, '1 comment', '%count comments'), "node/$node->nid", array('title' => t('Jump to the first comment of this posting.')), NULL, 'comment'); + $new = comment_num_new($node->nid); + if ($new) { $links[] = l(format_plural($new, '1 new comment', '%count new comments'), "node/$node->nid", array('title' => t('Jump to the first new comment of this posting.')), NULL, 'new'); }