You are here

function webfm_uninstall in Web File Manager 5.2

Same name and namespace in other branches
  1. 5 webfm.install \webfm_uninstall()

Implementation of hook_uninstall().

File

./webfm.install, line 70

Code

function webfm_uninstall() {
  db_query('DROP TABLE {webfm_file}');
  db_query('DROP TABLE {webfm_attach}');
  variable_del('webfm_root_dir');
  variable_del('webfm_ftp_enable');
  variable_del('webfm_ftp_root_dir');
  variable_del('webfm_icon_dir');
  variable_del('webfm_attach_body');
  variable_del('webfm_attach_desc');
  variable_del('webfm_attach_date');
  variable_del('webfm_attach_size');
  variable_del('webfm_debug');
  variable_del('webfm_cron');
  variable_del('webfm_frbdn');
  variable_del('webfm_max_resolution');
  variable_del('webfm_ie_dd_list_offset');
  variable_del('webfm_ie_dd_tree_offset');
  $roles = user_roles(1, 'access webfm');
  foreach ($roles as $rid => $role) {
    variable_del('webfm_extensions_' . $rid);
    variable_del('webfm_uploadsize_' . $rid);
    variable_del('webfm_usersize_' . $rid);
  }
  $types = node_get_types();
  foreach ($types as $type) {
    if ($type->type) {
      variable_del('webfm_attach_' . $type->type);
    }
  }
}