You are here

function webfm_get_attachments in Web File Manager 5

Same name and namespace in other branches
  1. 5.2 webfm.module \webfm_get_attachments()
3 calls to webfm_get_attachments()
webfm_ajax in ./webfm.module
Ajax post requests
webfm_attach_box in ./webfm.module
Get and theme node attachments
webfm_nodeapi in ./webfm.module
Implementation of hook_nodeapi().

File

./webfm.module, line 2236

Code

function webfm_get_attachments($nid) {
  $files = array();
  $file_result = db_query('SELECT * FROM {webfm_file} f INNER JOIN {webfm_attach} a ON f.fid = a.fid WHERE a.nid = %d ORDER BY a.weight', $nid);
  while ($file_record = db_fetch_object($file_result)) {
    $_file = new webfm_fdesc($file_record);
    if ($_file->result == TRUE) {
      $files[] = $_file;
    }
  }
  return $files;
}