You are here

function s3fs_update_7207 in S3 File System 7.3

Update s3fs variable names to support AWS SDK v3.

File

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

Code

function s3fs_update_7207() {
  $var_conversions = array(
    'awssdk2_access_key' => 'awssdk_access_key',
    'awssdk2_secret_key' => 'awssdk_secret_key',
    's3fs_awssdk2_access_key' => 's3fs_awssdk_access_key',
    's3fs_awssdk2_secret_key' => 's3fs_awssdk_secret_key',
    'awssdk2_use_instance_profile' => 's3fs_use_instance_profile',
    'awssdk2_default_cache_config' => 's3fs_credentials_file',
  );
  foreach ($var_conversions as $old_var => $new_var) {
    $old_value = variable_get($old_var, 'unset');
    if ($old_value != 'unset') {
      variable_set($new_var, $old_value);
      variable_del($old_var);
    }
  }
}