You are here

function flag_comment in Flag 6.2

Implements hook_comment().

1 string reference to 'flag_comment'
flag_flag_definitions in ./flag.inc
Implementation of hook_flag_definitions().

File

./flag.module, line 1013
The Flag module.

Code

function flag_comment(&$comment, $op) {
  switch ($op) {
    case 'delete':
      db_query("DELETE FROM {flag_content}\n                 WHERE content_type = 'comment'\n                   AND content_id = %d", $comment->cid);
      db_query("DELETE FROM {flag_counts}\n                 WHERE content_type = 'comment'\n                   AND content_id = %d", $comment->cid);
      break;
  }
}