You are here

function _linkchecker_batch_import_single_box in Link checker 6.2

Recurring scans of a single block via batch API.

Parameters

int $bid: The unique block id to scan for links.

int $missing_links_count: The number of links not yet added to linkchecker_links table. By this number the re-scan rounds are calulated.

Return value

The batch task definition.

1 call to _linkchecker_batch_import_single_box()
_linkchecker_add_box_links in ./linkchecker.module
Add block links to database.

File

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

Code

function _linkchecker_batch_import_single_box($bid, $missing_links_count) {
  $operations = array();
  for ($i = 0; $i <= $missing_links_count; $i = $i + LINKCHECKER_SCAN_MAX_LINKS_PER_RUN) {
    $operations[] = array(
      '_linkchecker_batch_single_box_import_op',
      array(
        $bid,
      ),
    );
  }
  $batch = array(
    'file' => drupal_get_path('module', 'linkchecker') . '/includes/linkchecker.batch.inc',
    'finished' => '_linkchecker_batch_single_box_import_finished',
    'operations' => $operations,
    'title' => t('Scanning for links'),
    'progress_message' => t('Remaining @remaining of @total scans.'),
  );
  return $batch;
}