You are here

function search_file_attachments_uninstall in Search File Attachments 7

Implements hook_uninstall().

File

./search_file_attachments.install, line 85
Module install

Code

function search_file_attachments_uninstall() {
  variable_del('search_file_attachments_tika_path');
  variable_del('search_file_attachments_tika_jar');
  variable_del('search_file_attachments_java_path');
  variable_del('search_file_attachments_include_extensions');
  variable_del('search_file_attachments_cron_last_change');
  variable_del('search_file_attachments_cron_last_id');

  // Remove the search index data, that comes from Search File Attachments.
  $query = db_select('search_dataset', 'sd');
  $query
    ->fields('sd', array(
    'sid',
  ))
    ->condition('sd.type', 'file');
  $results = $query
    ->execute();
  foreach ($results as $record) {
    search_reindex($record->sid, 'file');
  }
}