You are here

function _linkchecker_batch_import_boxes in Link checker 6.2

Same name and namespace in other branches
  1. 5.2 linkchecker.module \_linkchecker_batch_import_boxes()

Batch: Scan blocks for links.

3 calls to _linkchecker_batch_import_boxes()
linkchecker_admin_settings_form_submit in includes/linkchecker.admin.inc
linkchecker_analyze_links_submit in includes/linkchecker.admin.inc
Submit callback; Analyze all node types, boxes and cck fields.
linkchecker_clear_analyze_links_submit in includes/linkchecker.admin.inc
Submit callback; Clear link data and analyze all node types, boxes and cck fields.

File

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

Code

function _linkchecker_batch_import_boxes() {

  // Get all {boxes}.bid's as block module suxxx and has no usable hooks.
  $result = db_query('SELECT b.bid FROM {boxes} b ORDER BY b.bid');
  $operations = array();
  while ($row = db_fetch_array($result)) {
    $operations[] = array(
      '_linkchecker_batch_import_boxes_op',
      array(
        $row['bid'],
      ),
    );
  }
  $batch = array(
    'file' => drupal_get_path('module', 'linkchecker') . '/includes/linkchecker.batch.inc',
    'finished' => '_linkchecker_batch_box_import_finished',
    'operations' => $operations,
    'title' => t('Scanning for links'),
  );
  return $batch;
}