Commit 273a653f authored by Dries's avatar Dries

- Patch #111830 by pwolanin: comment block sql incompatible with db_rewrite_sql.

parent 1e9c5177
......@@ -256,7 +256,7 @@ function comment_get_recent($number = 10) {
// Select the $number nodes (visible to the current user) with the most
// recent comments. This is efficient due to the index on
// last_comment_timestamp.
$result = db_query_range(db_rewrite_sql("SELECT n.nid FROM {node_comment_statistics} n WHERE n.comment_count > 0 ORDER BY n.last_comment_timestamp DESC"), 0, $number);
$result = db_query_range(db_rewrite_sql("SELECT nc.nid FROM {node_comment_statistics} nc WHERE nc.comment_count > 0 ORDER BY nc.last_comment_timestamp DESC", 'nc'), 0, $number);
$nids = array();
while ($row = db_fetch_object($result)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment