You are here

function spamicide_uninstall in Spamicide 6

Same name and namespace in other branches
  1. 5 spamicide.install \spamicide_uninstall()
  2. 7 spamicide.install \spamicide_uninstall()

Implementation of hook_uninstall(). Delete the tables required for the spamicide module

File

./spamicide.install, line 118
This module provides yet another tool to eliminate spam.

Code

function spamicide_uninstall() {
  drupal_uninstall_schema('spamicide');
  db_query("DELETE FROM {variable} WHERE name LIKE 'spamicide_%'");

  // Remove directory and generated files.
  $path = file_directory_path() . '/spamicide';
  $files = file_scan_directory($path, '.*');
  foreach ($files as $file) {
    unlink($file->filename);
  }
  rmdir($path);
  cache_clear_all('variables', 'cache');
}