Index: webfm_driver.inc =================================================================== --- webfm_driver.inc (revision 141) +++ webfm_driver.inc (working copy) @@ -46,8 +46,18 @@ clearstatcache(); $stats = stat($file->fpath); $info['mtime'] = $stats['mtime']; - $info['url'] = $base_url . '/?q=webfm_send/' . $fid; - $info['name'] = urldecode($file->ftitle) .' ['. basename($file->fpath) .']'; + if (variable_get('clean_url', FALSE)) { + $info['url'] = $base_url . '/webfm_send/' . $fid; + } + else { + $info['url'] = $base_url . '/?q=webfm_send/' . $fid; + } + if (!empty($file->ftitle)) { + $info['name'] = urldecode($file->ftitle) .' ['. basename($file->fpath) .']'; + } + else { + $info['name'] = basename($file->fpath); + } $info['size'] = $file->fsize; $info['nid'] = search_attachments_get_webfm_file_nids($fid); return $info;