You are here

function tac_fields_uninstall in Taxonomy Access Control 6

Implements hook_uninstall(). Removes module tables from the database.

File

tac_fields/tac_fields.install, line 136
Install, update, and uninstall functions for the TAC Fields module.

Code

function tac_fields_uninstall() {
  $status = drupal_uninstall_schema('tac_fields');

  // drupal_install_schema() returns an array of the results of each query;
  // each entry includes 'status' which is 0 for failure or 1 for success.
  $success = 1;
  foreach ($status as $s) {
    $success = $success * $s['success'];
  }
  if ($success) {
    drupal_set_message(t('TAC Fields has been successfully uninstalled.'));
  }
  else {
    drupal_set_message(t('Uninstalling TAC Fields was unsuccessful.'), 'error');
  }
}