You are here

function _linkchecker_batch_single_comment_import_op in Link checker 7

Same name and namespace in other branches
  1. 6.2 includes/linkchecker.batch.inc \_linkchecker_batch_single_comment_import_op()

Run single comment link extraction.

Parameters

int $cid: Comment ID.

array $context: Batch context array.

1 string reference to '_linkchecker_batch_single_comment_import_op'
_linkchecker_batch_import_single_comment in ./linkchecker.batch.inc
Recurring scans of a single comment via batch API.

File

./linkchecker.batch.inc, line 272
Batch API callbacks for the linkchecker module.

Code

function _linkchecker_batch_single_comment_import_op($cid, &$context) {
  $comment = comment_load($cid);
  _linkchecker_add_comment_links($comment, TRUE);

  // Store results for post-processing in the finished callback.
  $context['results'][] = $comment->cid;
  $context['message'] = t('Comment: @title', array(
    '@title' => $comment->subject,
  ));
}