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'
- webfm_views_tables in ./webfm_views.inc
File
- ./webfm_views.inc, line 162
Code
function webfm_views_handler_file_all_files($fieldinfo, $fielddata, $value, $data) {
$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 {
$links[] = l(check_plain($file->fname), 'webfm_send/' . $file->fid);
}
}
return implode(' | ', $links);
}