You are here

function heartbeat_uninstall in Heartbeat 6.4

Same name and namespace in other branches
  1. 8 heartbeat.install \heartbeat_uninstall()
  2. 6.3 heartbeat.install \heartbeat_uninstall()
  3. 7 heartbeat.install \heartbeat_uninstall()

Implementation of hook_uninstall().

File

./heartbeat.install, line 48
Installation file for the heartbeat module. @author Jochen Stals - Menhir - www.menhir.be

Code

function heartbeat_uninstall() {

  // Remove all variables.
  db_query("DELETE FROM {variable} WHERE name LIKE 'heartbeat_%%'");
  cache_clear_all('variables', 'cache');

  // Remove all tables so no need to delete the messages.
  drupal_uninstall_schema('heartbeat');

  // This should clear the rules with a linkage to the heartbeat action.
  if (module_exists('rules')) {
    menu_rebuild();
    rules_clear_cache();
  }
}