You are here

function better_statistics_uninstall in Better Statistics 6

Same name and namespace in other branches
  1. 8 better_statistics.install \better_statistics_uninstall()
  2. 7 better_statistics.install \better_statistics_uninstall()

Implements hook_uninstall().

Removes fields provided by this module from the accesslog table.

File

./better_statistics.install, line 35
Install and uninstall functions for the Better Statistics module.

Code

function better_statistics_uninstall() {

  // Load our field definitions.
  module_load_include('inc', 'better_statistics', 'better_statistics.helpers');
  $fields = _better_statistics_define_fields(TRUE);

  // For each field defined, remove it from the accesslog table.
  foreach ($fields as $name => $field) {
    $return[$name] = array();
    db_drop_field($return[$name], 'accesslog', $name, $field);
  }
}