diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-02-01 14:04:50 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-02-01 14:04:50 +0000 |
commit | baa2ecc81cb09791286b0f906b0dd643c4de4b2d (patch) | |
tree | 6128fc47a0719fc5d15f3b8615ae5cbe41eb395c /modules/comment | |
parent | a6dac9d2ab68ba9e51fca46100534725c2a94ce7 (diff) | |
download | brdo-baa2ecc81cb09791286b0f906b0dd643c4de4b2d.tar.gz brdo-baa2ecc81cb09791286b0f906b0dd643c4de4b2d.tar.bz2 |
- Patch #47045 by Cvbge: fixed problem with deleting comments.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 637e04e5b..cbf1a1215 100644 --- a/modules/comment/comment.module +++ b/modules/comment/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); } } |