You are here

function amazons3_update_7204 in AmazonS3 7.2

Convert presigned URLs to structured arrays.

File

./amazons3.install, line 253
Install, update and uninstall functions for the AmazonS3 module.

Code

function amazons3_update_7204() {
  $lines = variable_get('amazons3_presigned_urls', array());
  if (empty($lines)) {
    return;
  }
  $config = array();
  foreach ($lines as $line) {
    list($timeout, $pattern) = explode("|", $line);
    $config[] = array(
      'timeout' => $timeout,
      'pattern' => $pattern,
    );
  }
  variable_set('amazons3_presigned_urls', $config);
}