function webfm_views_handler_file_all_files in Web File Manager 5.2
Same name and namespace in other branches
- 5 webfm_views.inc \webfm_views_handler_file_all_files()
1 string reference to 'webfm_views_handler_file_all_files'
File
- ./
webfm_views.inc, line 162
Code
function webfm_views_handler_file_all_files($fieldinfo, $fielddata, $value, $data) {
//global $base_url;
$links = array();
$query = "SELECT wf.* FROM {webfm_file} wf INNER JOIN {webfm_attach} wa ON wf.fid = wa.fid WHERE wa.nid = %d ORDER BY %s";
$result = db_query($query, $data->nid, 'wa.weight');
while ($file = db_fetch_object($result)) {
if ($fielddata['options'] == 'nolink') {
$links[] = check_plain($file->fname);
}
else {
// could add the icon here - really this should be all a theme thing where the user decides...
// but until then lets just provide the links with the file names
//$icon_path = $base_url.'/'.variable_get('webfm_icon_dir', 'modules/webfm/image/icon').'/f.gif';
//$links[] = l('<img src="'.$icon_path.'" alt="[file]" /> ', 'webfm_send/'.$file->fid.'/0', '', '' , '' , '', TRUE). l(check_plain($file->fname), 'webfm_send/'.$file->fid);
$links[] = l(check_plain($file->fname), 'webfm_send/' . $file->fid);
}
}
return implode(' | ', $links);
}