function user_stats_comment_delete in User Stats 7
Implements hook_comment_delete().
File
- ./
user_stats.module, line 391 - User Stats provides commonly requested user statistics for themers. These are:
Code
function user_stats_comment_delete($comment) {
if (variable_get('user_stats_count_comments', TRUE)) {
if ($comment->uid == NULL) {
$comment->uid = 0;
}
$post_count_content_types = variable_get('user_stats_included_content_types', array());
$node = node_load($comment->nid);
if (empty($post_count_content_types) || in_array($node->type, $post_count_content_types)) {
if ($comment->status == COMMENT_PUBLISHED) {
user_stats_post_count_update('decrement', $comment->uid);
}
}
}
}