You are here

function spam_uninstall in Spam 5.3

Same name and namespace in other branches
  1. 5 spam.install \spam_uninstall()
  2. 6 spam.install \spam_uninstall()

Completely uninstall the spam module.

File

./spam.install, line 224

Code

function spam_uninstall() {
  $tables = array(
    'spam_filters',
    'spam_tracker',
    'spam_log',
    'spam_filters_groups',
    'spam_filters_groups_data',
    'spam_filters_errors',
    'spam_statistics',
  );
  foreach ($tables as $table) {

    // We break out $table, otherwise this query gets misinterpreted.
    db_query('DROP TABLE {' . $table . '}');
  }
  drupal_set_message(t('All spam module tables have been deleted.'));
}