diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-03-06 16:15:19 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-03-06 16:15:19 +0000 |
commit | 273a653f561bf96ce0ee4c88b7f59f5ce0d26f61 (patch) | |
tree | 905df10710a67f289df7c6e396e5d340b182445e /modules/comment/comment.module | |
parent | 1e9c5177966ec7bd487d0bf9d29135cd14d7ba2a (diff) | |
download | brdo-273a653f561bf96ce0ee4c88b7f59f5ce0d26f61.tar.gz brdo-273a653f561bf96ce0ee4c88b7f59f5ce0d26f61.tar.bz2 |
- Patch #111830 by pwolanin: comment block sql incompatible with db_rewrite_sql.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index e0f6e9ccf..104a0a496 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -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)) { |