You are here

function labjs_build_uri in LABjs 6

Given path output uri to that file. CDN aware.

Parameters

$filename_md5: md5 of filename.

$data: data to store.

1 call to labjs_build_uri()
_labjs_prepare_required_js in ./labjs.module
Returns the required code to be inserted into page header.

File

./labjs.module, line 157
LABjs module

Code

function labjs_build_uri($path) {

  // CDN Support.
  if (module_exists('cdn')) {
    $status = variable_get(CDN_STATUS_VARIABLE, CDN_DISABLED);
    if (($status == CDN_ENABLED || $status == CDN_TESTING && user_access(CDN_PERM_ACCESS_TESTING)) && variable_get(CDN_THEME_LAYER_FALLBACK_VARIABLE, FALSE) == FALSE) {
      return file_create_url($path);
    }
  }
  return base_path() . $path;
}