You are here

function search_file_attachments_file_delete in Search File Attachments 7

Implements hook_file_delete().

File

./search_file_attachments.module, line 163
Contains the functionality for the Search File Attachments module.

Code

function search_file_attachments_file_delete($file) {

  // Delete the entry from the search index.
  search_reindex($file->fid, 'file');

  // Delete the file content cache entry.
  db_delete('search_file_attachments_index')
    ->condition('fid', $file->fid)
    ->execute();
}