summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-09-25 15:05:01 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-09-25 15:05:01 +0000
commit5d1c88894979b8e6199a21b237fd12b9229f1fe6 (patch)
tree74dd8c7cdaa9df8b09b97d0c58b386b6ede91ac7 /modules
parent6cf4f6b1ce0ade0b6a54f7af21f9f666bb4d06e6 (diff)
downloadbrdo-5d1c88894979b8e6199a21b237fd12b9229f1fe6.tar.gz
brdo-5d1c88894979b8e6199a21b237fd12b9229f1fe6.tar.bz2
#177182 by hswong3i: the range query in node_update_index() used more arguments the placeholders
Diffstat (limited to 'modules')
-rw-r--r--modules/node/node.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index ca0e34afe..40cf676aa 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1627,7 +1627,7 @@ function node_update_index() {
variable_set('node_cron_comments_scale', 1.0 / max(1, db_result(db_query('SELECT MAX(comment_count) FROM {node_comment_statistics}'))));
variable_set('node_cron_views_scale', 1.0 / max(1, db_result(db_query('SELECT MAX(totalcount) FROM {node_counter}'))));
- $result = db_query_range('SELECT GREATEST(IF(c.last_comment_timestamp IS NULL, 0, c.last_comment_timestamp), n.changed) as last_change, n.nid FROM {node} n LEFT JOIN {node_comment_statistics} c ON n.nid = c.nid WHERE n.status = 1 AND ((GREATEST(n.changed, c.last_comment_timestamp) = %d AND n.nid > %d) OR (n.changed > %d OR c.last_comment_timestamp > %d)) ORDER BY GREATEST(n.changed, c.last_comment_timestamp) ASC, n.nid ASC', $last, $last_nid, $last, $last, $last, 0, $limit);
+ $result = db_query_range('SELECT GREATEST(IF(c.last_comment_timestamp IS NULL, 0, c.last_comment_timestamp), n.changed) as last_change, n.nid FROM {node} n LEFT JOIN {node_comment_statistics} c ON n.nid = c.nid WHERE n.status = 1 AND ((GREATEST(n.changed, c.last_comment_timestamp) = %d AND n.nid > %d) OR (n.changed > %d OR c.last_comment_timestamp > %d)) ORDER BY GREATEST(n.changed, c.last_comment_timestamp) ASC, n.nid ASC', $last, $last_nid, $last, $last, 0, $limit);
while ($node = db_fetch_object($result)) {
$last_change = $node->last_change;