function webform_file_name in Webform 6.3
Same name and namespace in other branches
- 6.2 components/file.inc \webform_file_name()
- 7.4 components/file.inc \webform_file_name()
- 7.3 components/file.inc \webform_file_name()
Helper function to create proper file names for uploaded file.
2 calls to webform_file_name()
- theme_webform_render_file in components/
file.inc - Render a File component.
- _webform_table_file in components/
file.inc - Implements _webform_table_component().
File
- components/
file.inc, line 588 - Webform module file component.
Code
function webform_file_name($filepath) {
if (!empty($filepath)) {
$info = pathinfo($filepath);
$file_name = $info['basename'];
}
return isset($file_name) ? $file_name : '';
}