Skip to content
Snippets Groups Projects
Commit 1ec2b45b authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent 3c6d61e7
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment