From a04728577f34b98936c53799ccf1f2aaf7f3ff03 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 29 Dec 2008 16:03:57 +0000 Subject: - Patch #352054 by catch: convert calls to db_placeholders() in static queries. --- modules/comment/comment.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 4f47d9657..aa27ea651 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -605,7 +605,7 @@ function comment_nodeapi_load($nodes, $types) { // For nodes with comments enabled, fetch information from the database. if (!empty($comments_enabled)) { - $result = db_query('SELECT nid, last_comment_timestamp, last_comment_name, comment_count FROM {node_comment_statistics} WHERE nid IN(' . db_placeholders($comments_enabled) . ')', $comments_enabled); + $result = db_query('SELECT nid, last_comment_timestamp, last_comment_name, comment_count FROM {node_comment_statistics} WHERE nid IN(:comments_enabled)', array(':comments_enabled' => $comments_enabled)); foreach ($result as $record) { $nodes[$record->nid]->last_comment_timestamp = $record->last_comment_timestamp; $nodes[$record->nid]->last_comment_name = $record->last_comment_name; -- cgit v1.2.3