You are here

function date_api_uninstall in Date 7.3

Same name and namespace in other branches
  1. 8 date_api/date_api.install \date_api_uninstall()
  2. 5.2 date_api.install \date_api_uninstall()
  3. 6.2 date_api.install \date_api_uninstall()
  4. 6 date_api.install \date_api_uninstall()
  5. 7 date_api/date_api.install \date_api_uninstall()
  6. 7.2 date_api/date_api.install \date_api_uninstall()

Implements hook_uninstall().

File

date_api/date_api.install, line 90
Install, update and uninstall functions for the date_api module.

Code

function date_api_uninstall() {
  cache_clear_all('date_timezone_identifiers_list', 'cache');
  $variables = array(
    'date_api_version',
    'date_min_year',
    'date_max_year',
    'date_php_min_year',
    'date_db_tz_support',
    'date_api_use_iso8601',
  );
  foreach ($variables as $variable) {
    variable_del($variable);
  }
  if (db_table_exists('views_display')) {
    $displays = array(
      'date_nav',
    );
    db_query("DELETE FROM {views_display} WHERE display_plugin IN ('" . implode("','", $displays) . "')");
    db_query("DELETE FROM {cache_views}");
  }
}