function _biblio_search_status in Bibliography Module 7
Same name and namespace in other branches
- 7.2 includes/biblio.search.inc \_biblio_search_status()
Report the status of indexing.
Return value
An associative array with the key-value pairs:
- 'remaining': The number of items left to index.
- 'total': The total number of items to index.
File
- includes/
biblio.search.inc, line 69
Code
function _biblio_search_status() {
$total = db_query('SELECT COUNT(*) FROM {node} WHERE status = 1')
->fetchField();
$remaining = db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE n.status = 1 AND d.sid IS NULL OR d.reindex <> 0")
->fetchField();
return array(
'remaining' => $remaining,
'total' => $total,
);
}