You are here

function webform_file_name in Webform 7.3

Same name and namespace in other branches
  1. 6.3 components/file.inc \webform_file_name()
  2. 6.2 components/file.inc \webform_file_name()
  3. 7.4 components/file.inc \webform_file_name()

Helper function to create proper file names for uploaded file.

1 call to webform_file_name()
_webform_table_file in components/file.inc
Implements _webform_table_component().

File

components/file.inc, line 487
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 : '';
}