function _itweak_upload_file_create_url in iTweak Upload 6.2
3 calls to _itweak_upload_file_create_url()
- itweak_upload_itweak_upload_preview in ./
itweak_upload.module - Implementation of hook_itweak_upload_preview().
- itweak_upload_upload_attachments in ./
itweak_upload.module - Implementation of theme_upload_attachments(). Theme the attachments output.
- _itweak_upload_get_link_options in ./
itweak_upload.module - Retrieve link options - carries handler setting for link display mode.
File
- ./
itweak_upload.module, line 147 - iTweakUpload - Tweak attachments display and file upload forms.
Code
function _itweak_upload_file_create_url($file) {
if (function_exists('_private_upload_create_url')) {
$href = _private_upload_create_url($file);
}
else {
// [#706454] Fix-ahead for file path on new nodes when filefield_paths will change it after submit
// $href = file_create_url($file->filepath);
$alias = module_exists('filefield_paths') ? db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s'", 'filefield_paths/alias/' . $file->fid)) : false;
$href = $alias ? $alias : file_create_url($file->filepath);
}
return $href;
}