You are here

function aes_update_7100 in AES encryption 7

Convert old setting for aes_convert from string to boolean.

File

./aes.install, line 136
Install/uninstall related functions.

Code

function aes_update_7100(&$sandbox) {
  $old_value = variable_get("aes_convert", FALSE);
  if (is_string($old_value)) {
    $old_value = strtolower($old_value);
    $new_value = $old_value === 'true';
  }
  else {
    $new_value = (bool) $old_value;
  }
  variable_set("aes_convert", $new_value);
}