You are here

function taxonomy_machine_name_uninstall in Taxonomy Machine Name 7

Same name and namespace in other branches
  1. 8 taxonomy_machine_name.install \taxonomy_machine_name_uninstall()

Implements hook_uninstall().

File

./taxonomy_machine_name.install, line 32
Taxonomy Machine Name Install File.

Code

function taxonomy_machine_name_uninstall() {
  db_drop_unique_key('taxonomy_term_data', 'vid_machine_name');
  db_drop_index('taxonomy_term_data', 'machine_name');
  db_drop_field('taxonomy_term_data', 'machine_name');

  // Restore default migrate taxonomy handler.
  $disabled = unserialize(variable_get('migrate_disabled_handlers', serialize(array())));
  $position = array_search('MigrateTaxonomyTermReferenceFieldHandler', $disabled);
  if (!is_null($position)) {
    $disabled = array_values($disabled);
    variable_set('migrate_disabled_handlers', serialize($disabled));
  }
}