You are here

regcode_ie.install in Registration codes 7

Same filename and directory in other branches
  1. 7.2 regcode_ie/regcode_ie.install

Install, uninstall and scheme functions for the regcode_ie module.

File

regcode_ie/regcode_ie.install
View source
<?php

/**
 * @file
 * Install, uninstall and scheme functions for the regcode_ie module.
 */

/**
 * Implements hook_uninstall().
 */
function regcode_ie_uninstall() {
  variable_del('regcode_import_delimiter');
  variable_del('regcode_import_enclosure');
  variable_del('regcode_import_fieldorder');
}

/**
 * Implements hook_update_N().
 */
function regcode_ie_update_7001() {
  $vars = array(
    'regcode_import_delimiter' => ',',
    'regcode_import_enclosure' => '"',
    'regcode_import_fieldorder' => 'code',
  );
  foreach ($vars as $var_name => $default_value) {
    variable_set(str_replace('regcode_import', 'regcode_ie', $var_name), variable_get($var_name, $default_value));
    variable_del($var_name);
  }
  return 'Renamed variables successfully';
}

Functions