You are here

function taxonomy_csv_uninstall in Taxonomy CSV import/export 6.2

Same name and namespace in other branches
  1. 6.5 taxonomy_csv.install \taxonomy_csv_uninstall()
  2. 6.3 taxonomy_csv.install \taxonomy_csv_uninstall()
  3. 6.4 taxonomy_csv.install \taxonomy_csv_uninstall()
  4. 7.5 taxonomy_csv.install \taxonomy_csv_uninstall()
  5. 7.4 taxonomy_csv.install \taxonomy_csv_uninstall()

Implements hook_uninstall().

File

./taxonomy_csv.install, line 25
Taxonomy_csv install and uninstall hook.

Code

function taxonomy_csv_uninstall() {

  // Remove user preferences.
  foreach (array(
    // Import variables.
    'import_format',
    'source_choice',
    'import_delimiter',
    'import_delimiter_custom',
    'import_enclosure',
    'import_enclosure_custom',
    'check_line',
    'check_utf8',
    'locale_custom',
    'vocabulary_target',
    'vocabulary_id',
    'check_hierarchy',
    'set_hierarchy',
    'existing_items',
    'relations_create_subrelations',
    'relations_all_vocabularies',
    'result_stats',
    'result_terms',
    'result_level',
    'result_type',
    // Export variables.
    'export_format',
    'export_delimiter',
    'export_delimiter_custom',
    'export_enclosure',
    'export_enclosure_custom',
    'export_line_ending',
    'export_order',
    'result_duplicates',
    'def_links_terms_ids',
    'def_links_vocabularies_ids',
    // Remove variables from previous releases.
    // < 6.x.4.0.
    'import_create_subrelations',
    'import_all_vocabularies',
    'source_delimiter_custom_field',
    // < 6.x.4.1.
    // < 7.x.4.1.
    'source_disable_convert_to_utf8',
    // < 6.x.4.2.
    // < 7.x.4.2.
    'source_convert_to_utf8',
    'autodivide_import',
    'autodivide_lines',
    'result_display_level',
    'result_display_type',
    // < 6.x.4.7.
    // < 7.x.4.7.
    'source_content',
    'source_delimiter',
    'source_delimiter_custom',
    'source_enclosure',
    'source_enclosure_custom',
    'destination_target',
    'destination_vocabulary_id',
    'import_existing_items',
    // < 6.x.5.0.
    // < 7.x.5.0.
    'disable_internal_cache',
    'disable_hierarchy_check',
    'disable_line_checks',
    'disable_utf8_check',
    'fields_links_terms_ids',
    'fields_links_vocabularies_ids',
  ) as $option) {
    variable_del("taxonomy_csv_{$option}");
  }
  drupal_set_message(st('Taxonomy csv import/export: All user preferences have been removed. Thanks for using this module!<br />
    Your comments are welcomed on <a href="!link">Taxonomy csv import/export</a>.', array(
    '!link' => url('http://drupal.org/project/taxonomy_csv'),
  )));
}