diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-12-13 10:24:58 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-12-13 10:24:58 +0000 |
commit | a043194e3fd94ca861adf479b9e02cd41d2cb144 (patch) | |
tree | bec62f11a2ab987e6f4b22cfa3110b8cbaa3ecfe | |
parent | 3f829e1ff5e7a578c3c1492151c873d014195f32 (diff) | |
download | brdo-a043194e3fd94ca861adf479b9e02cd41d2cb144.tar.gz brdo-a043194e3fd94ca861adf479b9e02cd41d2cb144.tar.bz2 |
#102353: Fix comment tracking when comment module has been disabled.
-rw-r--r-- | modules/comment/comment.install | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/comment/comment.install b/modules/comment/comment.install new file mode 100644 index 000000000..eda099ebe --- /dev/null +++ b/modules/comment/comment.install @@ -0,0 +1,10 @@ +<?php +// $Id$ + +/** + * Implementation of hook_enable(). + */ +function comment_enable() { + // Insert records into the node_comment_statistics for nodes that are missing. + db_query("INSERT INTO {node_comment_statistics} (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) SELECT n.nid, n.created, NULL, n.uid, 0 FROM {node} n LEFT JOIN {node_comment_statistics} c ON n.nid = c.nid WHERE c.comment_count IS NULL"); +} |