You are here

function webform_get_file in Webform 6.3

Same name and namespace in other branches
  1. 7.4 components/file.inc \webform_get_file()
  2. 7.3 components/file.inc \webform_get_file()

Helper function to load a file from the database.

8 calls to webform_get_file()
theme_webform_render_file in components/file.inc
Render a File component.
_webform_analysis_file in components/file.inc
Implements _webform_analysis_component().
_webform_attachments_file in components/file.inc
Implements _webform_attachments_component().
_webform_csv_data_file in components/file.inc
Implements _webform_csv_data_component().
_webform_delete_file in components/file.inc
Implements _webform_delete_component().

... See full list

File

components/file.inc, line 620
Webform module file component.

Code

function webform_get_file($fid) {
  static $files;
  if (!isset($files[$fid])) {
    if (empty($fid)) {
      $files[$fid] = FALSE;
    }
    else {
      $files[$fid] = db_fetch_object(db_query("SELECT * FROM {files} WHERE fid = %d", $fid));
    }
  }
  return $files[$fid];
}