You are here

function _webform_table_multifile in Webform Multiple File Upload 7

Same name and namespace in other branches
  1. 6 multifile.inc \_webform_table_multifile()

Implementation of _webform_table_component().

File

./multifile.inc, line 689
Webform module file component.

Code

function _webform_table_multifile($component, $value) {
  $links = array();
  if ($fids = isset($value[0]) ? drupal_json_decode($value[0]) : FALSE) {
    foreach (webform_get_multifile($fids) as $file) {
      if (!empty($file->fid)) {
        $link = l(webform_multifile_name($file->uri), webform_multifile_url($file->uri));
        $link .= ' (' . (int) ($file->filesize / 1024) . ' KB)';
        $links[] = $link;
      }
    }
  }
  return implode("<br />\n", $links);
}