You are here

function yandex_metrics_uninstall in Yandex.Metrics 6

Same name and namespace in other branches
  1. 6.2 yandex_metrics.install \yandex_metrics_uninstall()
  2. 7.3 yandex_metrics.install \yandex_metrics_uninstall()
  3. 7 yandex_metrics.install \yandex_metrics_uninstall()
  4. 7.2 yandex_metrics.install \yandex_metrics_uninstall()

Implementation of hook_uninstall().

File

./yandex_metrics.install, line 17
Install, uninstall and update the module.

Code

function yandex_metrics_uninstall() {

  // Delete module variables and clear variables cache.
  db_query("DELETE FROM {variable} WHERE name LIKE 'yandex_metrics_%'");
  cache_clear_all('variables', 'cache');

  // Remove block.
  db_query("DELETE FROM {blocks} WHERE module = 'yandex_metrics'");

  // Uninstall schema.
  drupal_uninstall_schema('yandex_metrics');
}