Index: webform_report.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/webform_report/Attic/webform_report.inc,v retrieving revision 1.1.2.27 diff -u -r1.1.2.27 webform_report.inc --- webform_report.inc 21 May 2010 17:19:54 -0000 1.1.2.27 +++ webform_report.inc 24 Jun 2010 12:10:27 -0000 @@ -101,12 +101,26 @@ $values[$row->sid][-5] = array('data' => l('edit', 'node/'. $row->nid . '/submission/' . $row->sid . '/edit'), 'field' => -5); // special handling for file uploads if ($row->type == 'file') { - $tmp = unserialize($row->data); $link = ' '; - if (!empty($tmp['filename'])) { - $link = '' . - $tmp['filename'] . ' (' . (int) ($tmp['filesize'] / 1024) .' KB)' . - ''; + // new file handling in webforms 6.x-3.x - data is an id + if (is_numeric($row->data)) { + // must load the webform file component handler + module_load_include('inc', 'webform', 'components/file'); + $file = webform_get_file($row->data); + if (!empty($file->fid)) { + $link = '' . + webform_file_name($file->filepath) . '' . + ' (' . (int) ($file->filesize/1024) . ' KB)'; + } + } + // file handling for prior versions of webforms + else { + $tmp = unserialize($row->data); + if (!empty($tmp['filename'])) { + $link = '' . + $tmp['filename'] . '' . + ' (' . (int) ($tmp['filesize'] / 1024) .' KB)'; + } } $values[$row->sid][$row->cid] = array('data' => $link, 'field' => $row->cid); }