You are here

function linkchecker_comment_insert in Link checker 7

Implements hook_comment_insert().

File

./linkchecker.module, line 968
This module periodically check links in given node types, blocks etc.

Code

function linkchecker_comment_insert($comment) {

  // The comment is going to be published.
  $node_type = db_query('SELECT type FROM {node} WHERE nid = :nid', array(
    ':nid' => $comment->nid,
  ))
    ->fetchField();
  if (variable_get('linkchecker_scan_comment_' . $node_type, FALSE) && $comment->status == COMMENT_PUBLISHED) {
    _linkchecker_add_comment_links($comment);
  }
}