1 node.module node_search_status()

Implements hook_search_status().


core/modules/node/node.module, line 1320
The core module that allows content to be submitted to the site.


function node_search_status() {
  $types = _node_search_get_types();
  $total = db_query('SELECT COUNT(*) FROM {node}')->fetchField();
  $remaining = db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE (d.sid IS NULL OR d.reindex <> 0) AND n.type IN (:types)", array(':types' => $types))->fetchField();
  return array('remaining' => $remaining, 'total' => $total);