You are here

function file_entity_search_status in File Entity (fieldable files) 7.3

Same name and namespace in other branches
  1. 7.2 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,
  );
}