You are here

function s3fs_update_7001 in S3 File System 7

Same name and namespace in other branches
  1. 7.3 s3fs.install \s3fs_update_7001()
  2. 7.2 s3fs.install \s3fs_update_7001()

Variable updates.

File

./s3fs.install, line 243
Install, update and uninstall functions for the S3 File System module.

Code

function s3fs_update_7001() {

  // Rename s3fs_customhost to s3fs_use_customhost. And since the code now
  // assumes that the variable is set, set it to FALSE if it's not.
  $customhost = variable_get('s3fs_customhost', 'unset');
  if ($customhost !== 'unset') {
    variable_set('s3fs_use_customhost', $customhost);
    variable_del('s3fs_customhost');
  }
  else {
    variable_set('s3fs_use_customhost', FALSE);
  }

  // Rename s3fs_cname to s3fs_use_cname.
  $cname = variable_get('s3fs_cname', 'unset');
  if ($cname !== 'unset') {
    variable_set('s3fs_use_cname', $cname);
    variable_del('s3fs_cname');
  }
  else {
    variable_set('s3fs_use_cname', FALSE);
  }
}