You are here

function simple_access_update_7202 in Simple Access 7.2

Update variable names.

File

./simple_access.install, line 203
Installation for Simple Access

Code

function simple_access_update_7202(&$sandbox) {

  // Only write new variables when they are not default values.
  $var = variable_get('sa_display', array(
    'view',
  ));
  if ($var != array(
    'view',
  )) {
    variable_set('simple_access_display', $var);
  }
  $var = variable_get('sa_showgroups', 0);
  if ($var != 0) {
    variable_set('simple_access_showgroups', $var);
  }
  variable_del('sa_display');
  variable_del('sa_showgroups');
  return t('Updated variable names from sa_* to simple_access_*');
}