function spam_uninstall in Spam 5
Same name and namespace in other branches
- 5.3 spam.install \spam_uninstall()
- 6 spam.install \spam_uninstall()
Implementation of hook_uninstall. This code deletes all tables and variables created by this module.
File
- ./
spam.install, line 157
Code
function spam_uninstall() {
db_query("DROP TABLE {spam_tracker}");
db_query("DROP TABLE {spam_tokens}");
db_query("DROP TABLE {spam_custom}");
db_query("DROP TABLE {spam_reported}");
db_query("DROP TABLE {spam_log}");
// TODO: Build an array of all variables that need to be deleted, and
// delete them individually. This query could accidentally remove variables
// unrelated to the spam module.
// db_query("DELETE FROM {variable} WHERE name LIKE('spam_%%')");
// Clear the menu cache to remove our stuff.
cache_clear_all('*', 'cache_menu', TRUE);
//drupal_set_message(t('All tables and variables required by the Spam module have been removed.'));
drupal_set_message(t('All tables required by the Spam module have been removed.'));
}