You are here

function imce_relative_url in IMCE 5

1 call to imce_relative_url()
imce_browse in ./imce.module
Image Browser.

File

./imce.module, line 816

Code

function imce_relative_url($path = '') {
  if (variable_get('file_downloads', '') == FILE_DOWNLOADS_PRIVATE) {
    $file = trim(substr($path, strlen(file_directory_path())), '\\/');
    return url('system/files') . (strlen($file) ? '/' . $file : '');
  }
  return base_path() . $path;
}