function _linkchecker_batch_import_nodes in Link checker 6.2
Same name and namespace in other branches
- 5.2 linkchecker.module \_linkchecker_batch_import_nodes()
- 7 linkchecker.batch.inc \_linkchecker_batch_import_nodes()
Batch: Scan nodes for links.
3 calls to _linkchecker_batch_import_nodes()
- 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 13 - Batch API callbacks for the linkchecker module.
Code
function _linkchecker_batch_import_nodes($node_types = array()) {
// Get all active {node}.nid's.
$result = db_query('SELECT n.nid FROM {node} n WHERE n.status = %d AND n.type IN (' . db_placeholders($node_types, 'varchar') . ') ORDER BY n.nid', array_merge(array(
1,
), $node_types));
$operations = array();
while ($row = db_fetch_array($result)) {
$operations[] = array(
'_linkchecker_batch_node_import_op',
array(
$row['nid'],
),
);
}
$batch = array(
'file' => drupal_get_path('module', 'linkchecker') . '/includes/linkchecker.batch.inc',
'finished' => '_linkchecker_batch_node_import_finished',
'operations' => $operations,
'title' => t('Scanning for links'),
);
return $batch;
}