You are here

function cdn_update_6200 in CDN 6.2

Same name and namespace in other branches
  1. 7.2 cdn.install \cdn_update_6200()

In version 2 of the CDN integration module, basic mode is more flexible than in version 1: there now is the ability to have multiple CDN URLs.

File

./cdn.install, line 252
Install file.

Code

function cdn_update_6200() {
  $url = variable_get('cdn_basic_url', '');
  $exts = variable_get('cdn_basic_extensions', '');

  // Store URL variable in new format, then delete old variables.
  $cdn_basic_mapping = $url;
  if (!empty($exts)) {
    $cdn_basic_mapping .= '|' . $exts;
  }
  variable_set('cdn_basic_mapping', $url . '|' . $exts);
  variable_del('cdn_basic_url');
  variable_del('cdn_basic_extensions');
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Updated variables to allow for multiple Origin Pull CDN URLs instead of just one.',
  );
  return array();
}