You are here

function statistics_counter_uninstall in Statistics Counter 7

Same name and namespace in other branches
  1. 8 statistics_counter.install \statistics_counter_uninstall()

Implements hook_uninstall().

File

./statistics_counter.install, line 59
Statistics Counter

Code

function statistics_counter_uninstall() {
  $t = get_t();
  $transaction = db_transaction();
  try {
    db_drop_field('node_counter', 'weekcount');
    db_drop_field('node_counter', 'monthcount');
    db_drop_field('node_counter', 'yearcount');

    // Ignore slave server temporarily to give time for the
    // saved block to be propagated to the slave.
    db_ignore_slave();
  } catch (Exception $e) {
    $transaction
      ->rollback();
    watchdog_exception('php', $e);
    drupal_set_message($t('Cannot drop fields'), 'error');
  }
}