- Patch #104156 by chromeyellow and Heine: avoid redundant SQL queries.

5.x
Dries Buytaert 2007-01-03 11:32:38 +00:00
parent 3c6d61e73c
commit 1ec2b45be7
1 changed files with 2 additions and 1 deletions

View File

@ -298,7 +298,6 @@ function comment_link($type, $node = NULL, $teaser = FALSE) {
if (user_access('access comments')) {
$all = comment_num_all($node->nid);
$new = comment_num_new($node->nid);
if ($all) {
$links['comment_comments'] = array(
@ -308,6 +307,8 @@ function comment_link($type, $node = NULL, $teaser = FALSE) {
'fragment' => 'comments'
);
$new = comment_num_new($node->nid);
if ($new) {
$links['comment_new_comments'] = array(
'title' => format_plural($new, '1 new comment', '@count new comments'),