- Patch #111830 by pwolanin: comment block sql incompatible with db_rewrite_sql.
parent
1e9c517796
commit
273a653f56
|
@ -256,7 +256,7 @@ function comment_get_recent($number = 10) {
|
||||||
// Select the $number nodes (visible to the current user) with the most
|
// Select the $number nodes (visible to the current user) with the most
|
||||||
// recent comments. This is efficient due to the index on
|
// recent comments. This is efficient due to the index on
|
||||||
// last_comment_timestamp.
|
// 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();
|
$nids = array();
|
||||||
while ($row = db_fetch_object($result)) {
|
while ($row = db_fetch_object($result)) {
|
||||||
|
|
Loading…
Reference in New Issue