function _webform_csv_data_file in Webform 5
Same name and namespace in other branches
- 5.2 components/file.inc \_webform_csv_data_file()
- 6.3 components/file.inc \_webform_csv_data_file()
- 6.2 components/file.inc \_webform_csv_data_file()
- 7.4 components/file.inc \_webform_csv_data_file()
- 7.3 components/file.inc \_webform_csv_data_file()
Return the result of a file submission. The output of this function will be displayed under the "results" tab then "submissions".
Parameters
$data: An array of information containing the submission result, directly correlating to the webform_submitted_data database schema.
Return value
Textual output formatted for CSV, not including either prefixed or trailing commas.
File
- components/
file.inc, line 443
Code
function _webform_csv_data_file($data) {
$filedata = unserialize($data['value']['0']);
return empty($filedata['filename']) ? '\\,' : $filedata['filename'] . '\\,' . (int) ($filedata['filesize'] / 1024);
}