summaryrefslogtreecommitdiff
path: root/modules/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment.module')
-rw-r--r--modules/comment.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment.module b/modules/comment.module
index 637e04e5b..cbf1a1215 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -1695,7 +1695,8 @@ function _comment_update_node_statistics($nid) {
// no comments
else {
- db_query("UPDATE {node_comment_statistics} SET comment_count = 0, last_comment_timestamp = created, last_comment_name = '', last_comment_uid = uid FROM {node} WHERE {node_comment_statistics}.nid = {node}.nid AND {node}.nid = %d", $nid);
+ $node = db_fetch_object(db_query("SELECT uid, created FROM {node} WHERE nid = %d", $nid));
+ db_query("UPDATE {node_comment_statistics} SET comment_count = 0, last_comment_timestamp = %d, last_comment_name = '', last_comment_uid = %d WHERE nid = %d", $node->created, $node->uid, $nid);
}
}