You are here

function search_files_attachments_index_file in Search Files 7.2

Same name and namespace in other branches
  1. 6.2 search_files_attachments.module \search_files_attachments_index_file()

Indexing file contents.

1 call to search_files_attachments_index_file()
search_files_attachments_update_index in ./search_files_attachments.module
Implements hook_update_index().

File

./search_files_attachments.module, line 210
Used to index files in attachments

Code

function search_files_attachments_index_file($file) {
  $contents = search_files_attachments_get_file_contents($file->filepath);
  if ($contents) {
    $contents = search_files_convert_to_utf8($file->filename . ' ' . $contents);
    search_index($file->fid, 'search_files_att', $contents);
  }
  return $contents;
}