You are here

function _asa_get_file_url in Apache Solr Attachments 5

For a provided fid, get the file path.

File

./apachesolr_attachments.module, line 281
Provides a file attachment search implementation for use with the Apache Solr module

Code

function _asa_get_file_url($fid) {
  if (!empty($fid) && is_numeric($fid)) {
    $result = db_query('SELECT * FROM {files} WHERE fid = %d', $fid);
    $file = db_fetch_array($result);
    return $file['filepath'];
  }
}