You are here

function imagecache_uninstall in ImageCache 5

Same name and namespace in other branches
  1. 5.2 imagecache.install \imagecache_uninstall()
  2. 6.2 imagecache.install \imagecache_uninstall()

Implementation of hook_uninstall().

File

./imagecache.install, line 112

Code

function imagecache_uninstall() {
  db_query('DROP TABLE {imagecache_preset}');
  db_query('DROP TABLE {imagecache_action}');
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("DELETE FROM {sequences} WHERE name = '{imagecache_action}_actionid'");
      db_query("DELETE FROM {sequences} WHERE name = '{imagecache_action}_presetid'");
      break;
    case 'pgsql':
      db_query('DROP SEQUENCE {imagecache_action}_actionid_seq');
      db_query('DROP SEQUENCE {imagecache_preset}_presetid_seq');
      break;
  }
  drupal_set_message('ImageCache has been uninstalled. You should remove the imagecache folder from your Drupal files directory.');
}