function file_entity_search_status in File Entity (fieldable files) 7.2
Same name and namespace in other branches
- 7.3 file_entity.module \file_entity_search_status()
Implements hook_search_status().
File
- ./
file_entity.module, line 556 - Extends Drupal file entities to be fieldable and viewable.
Code
function file_entity_search_status() {
$total = db_query('SELECT COUNT(*) FROM {file_managed}')
->fetchField();
$remaining = db_query("SELECT COUNT(*) FROM {file_managed} fm LEFT JOIN {search_dataset} d ON d.type = 'file' AND d.sid = fm.fid WHERE d.sid IS NULL OR d.reindex <> 0")
->fetchField();
return array(
'remaining' => $remaining,
'total' => $total,
);
}