From c0d6f2ea5a3494fecad773fa0f78459171e819c7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Sat, 21 Nov 2009 17:53:17 +0000 Subject: [PATCH] - Patch #122098 by jeffschuler: small code clean up. --- modules/comment/comment.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 5b10d35be3cd..d119b8c8f296 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1561,9 +1561,9 @@ function comment_num_new($nid, $timestamp = 0) { $timestamp = ($timestamp > NODE_NEW_LIMIT ? $timestamp : NODE_NEW_LIMIT); // Use the timestamp to retrieve the number of new comments. - return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND changed > :changed AND status = :status', array( + return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND changed > :timestamp AND status = :status', array( ':nid' => $nid, - ':changed' => $timestamp, + ':timestamp' => $timestamp, ':status' => COMMENT_PUBLISHED, ))->fetchField(); } -- GitLab