You are here

function _boost_copy_file_get_domains in Boost 6

Get the various subdomains from parallel module.

Parameters

$dest: Destination.

6 calls to _boost_copy_file_get_domains()
boost_cache_css_js_files in ./boost.module
Cache css and or js files.
boost_cache_delete in ./boost.module
Deletes files in the cache.
boost_clear_cache_parallel in ./boost.admin.inc
boost_requirements in ./boost.install
Implementation of hook_requirements().
_boost_copy_file in ./boost.module
Copy a file.

... See full list

File

./boost.module, line 5019
Provides static file caching for Drupal text output. Pages, Feeds, ect...

Code

function _boost_copy_file_get_domains($dest) {
  global $base_url;
  $parts = parse_url($base_url);
  $destinations = array();
  $destinations[] = $dest;
  $domains = array();
  $domains[] = str_replace('//', '', variable_get('parallel_domain_css', ''));
  $domains[] = str_replace('//', '', variable_get('parallel_domain_img', ''));
  $domains[] = str_replace('//', '', variable_get('parallel_domain_js', ''));
  if (module_exists('cdn') && function_exists('cdn_get_domains')) {
    $domains = array_merge($domains, cdn_get_domains());
  }
  $domains = array_unique($domains);
  foreach ($domains as $domain) {
    $destinations[] = str_replace($parts['host'], $domain, $dest);
  }
  return $destinations;
}