function elfinder_file_directory_url in elFinder file manager 7
Same name and namespace in other branches
- 8.2 elfinder.module \elfinder_file_directory_url()
- 6.2 elfinder.module \elfinder_file_directory_url()
- 6 elfinder.module \elfinder_file_directory_url()
- 7.3 elfinder.module \elfinder_file_directory_url()
- 7.2 elfinder.module \elfinder_file_directory_url()
files directory url
1 call to elfinder_file_directory_url()
- elfinder_filesystemconnector in ./
elfinder.module - File browser to filesystem php connector callback
File
- ./
elfinder.module, line 686
Code
function elfinder_file_directory_url($force_relative = FALSE) {
global $base_root;
$fileurl = '';
if (variable_get('elfinder_settings_filesystem_root', 'system') == 'custom') {
$fileurl = variable_get('elfinder_settings_filesystem_url_custom', '') . '/';
if ($fileurl) {
$fileurl = elfinder_parse_path_tokens($fileurl);
}
}
else {
if (variable_get('file_default_scheme', 'public') != 'private') {
$fileurl = url('', array(
'absolute' => variable_get('elfinder_settings_filesystem_fileurl', 'true') == 'true' ? TRUE : FALSE,
'language' => '',
));
if (!preg_match("/\\/\$/", $fileurl)) {
$fileurl .= '/';
}
$fileurl .= elfinder_file_directory_path();
}
else {
drupal_set_message(t('Private filesystem support is not implemented yet!'), 'warning');
$fileurl = url('system/files', array(
'absolute' => variable_get('elfinder_settings_filesystem_fileurl', 'true') == 'true' ? TRUE : FALSE,
'language' => '',
));
}
$fileurl .= '/';
}
// Cutting off absolute url prefix
if ($force_relative) {
$fileurl = str_replace($base_root, '', $fileurl);
}
return $fileurl;
}