You are here

quant.install in Quant 7

Same filename and directory in other branches
  1. 6 quant.install

File

quant.install
View source
<?php

/**
 * Implementation of hook_uninstall()
 */
function quant_uninstall() {
  drupal_load('module', 'quant');

  // Module variables
  $variables = array(
    'quant_height',
    'quant_weight',
    'quant_visible',
    'quant_chart',
  );

  // Plugin variables
  foreach (quant_get_quant_charts() as $plugin) {
    $variables = array_merge($variables, $plugin->chart
      ->variables());
  }

  // Delete the variables
  foreach ($variables as $variable) {
    variable_del($variable);
  }
}

/**
 * Migrate a variable name change
 */
function quant_update_7000() {
  if ($palette = variable_get('quant_palette', NULL)) {
    variable_set('quant_chartapi_palette', $palette);
    variable_del('quant_palette');
  }
}

Functions

Namesort descending Description
quant_uninstall Implementation of hook_uninstall()
quant_update_7000 Migrate a variable name change