You are here

function _linkchecker_batch_node_import_op in Link checker 5.2

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

Batch operation: Load all nodes, 100 by hundred.

1 string reference to '_linkchecker_batch_node_import_op'
_linkchecker_batch_import_nodes in ./linkchecker.module
Batch: Load all nodes 100 by hundred.

File

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

Code

function _linkchecker_batch_node_import_op($row, $limit, $node_types) {

  // Retrieve the next group of records.
  $placeholders = implode(',', array_fill(0, count($node_types), "'%s'"));
  $result = db_query_range('SELECT nid FROM {node} WHERE status = %d AND type IN (' . $placeholders . ') ORDER BY nid ASC', array_merge(array(
    1,
  ), $node_types), $row, $limit);
  while ($res = db_fetch_array($result)) {

    // Load the node and scan for links.
    $node = node_load($res['nid'], NULL, TRUE);
    _linkchecker_add_node_links($node);
  }
}