You are here

function domain_prefix_uninstall in Domain Access 6.2

Same name and namespace in other branches
  1. 5 domain_prefix/domain_prefix.install \domain_prefix_uninstall()

Implement hook_uninstall()

File

domain_prefix/domain_prefix.install, line 37
Install file for the Domain Prefix module

Code

function domain_prefix_uninstall() {

  // We must drop all the created tables.
  $result = db_query("SELECT domain_id, tablename FROM {domain_prefix} WHERE status > 1");
  while ($table = db_fetch_array($result)) {
    $name = db_escape_table('domain_' . $table['domain_id'] . '_' . $table['tablename']);
    db_query("DROP TABLE {%s}", $name);
  }

  // Now drop the storage table.
  drupal_uninstall_schema('domain_prefix');
  variable_del('domain_prefix');
  variable_del('domain_prefix_options');
}