You are here

function nodeorder_uninstall in Node Order 6

Same name and namespace in other branches
  1. 8 nodeorder.install \nodeorder_uninstall()
  2. 7 nodeorder.install \nodeorder_uninstall()

Implementation of hook_uninstall()

Drops field 'weight_in_tid' from core table 'term_node'.

File

./nodeorder.install, line 60
Nodeorder install file.

Code

function nodeorder_uninstall() {
  $module_name = 'nodeorder';
  $ret = array();
  db_drop_index($ret, 'term_node', 'weight_in_tid');
  db_drop_field($ret, 'term_node', 'weight_in_tid');

  // Check for query errors
  for ($i = 0; $i < count($ret); $i++) {
    if ($ret[$i]['success'] !== TRUE) {
      $installation_failed = TRUE;
      break;
    }
  }
  if ($installation_failed) {
    drupal_set_message(st('Table uninstallation for the %name module was unsuccessful. The tables may need to be installed by hand.  See %name.install file for a list of the installation queries.', array(
      '%name' => $module_name,
    )), 'error');
  }
  else {
    drupal_set_message(st('The %name module was uninstalled successfully.', array(
      '%name' => $module_name,
    )));
  }
}