You are here

function mobile_codes_uninstall in Mobile Codes 5

Same name and namespace in other branches
  1. 6.2 mobile_codes.install \mobile_codes_uninstall()
  2. 6 mobile_codes.install \mobile_codes_uninstall()
  3. 7.2 mobile_codes.install \mobile_codes_uninstall()

File

./mobile_codes.install, line 49

Code

function mobile_codes_uninstall() {
  include_once drupal_get_path('module', 'mobile_codes') . '/mobile_codes.admin.inc';
  db_query('DROP TABLE {mobile_codes}');
  db_query('DROP TABLE {mobile_codes_presets}');
  if ($GLOBALS['db_type'] == 'pgsql') {
    db_query('DROP SEQUENCE {mobile_codes_preset_pid_seq};');
  }
  $dir = realpath(file_directory_path() . '/mobile_codes');
  if (is_dir($dir)) {
    _mobile_codes_recursive_delete($dir);
  }
  variable_del('mobile_codes_flush');
}