You are here

function _filebrowser_node_content_load in Filebrowser 7.2

Same name and namespace in other branches
  1. 8 filebrowser.common.inc \_filebrowser_node_content_load()
  2. 6.2 includes/backend.inc \_filebrowser_node_content_load()
  3. 7.4 filebrowser.common.inc \_filebrowser_node_content_load()
  4. 7.3 filebrowser.common.inc \_filebrowser_node_content_load()

Load a specific node content.

Parameters

$fid content fid:

Return value

content record

7 calls to _filebrowser_node_content_load()
filebrowser_form_delete_confirm in ./filebrowser.module
File delete confirmation form CHECK: $node is used but not defined in this function
filebrowser_form_delete_confirm_submit in ./filebrowser.module
File delete confirmation form submit
filebrowser_form_metadata in ./filebrowser.pages.inc
filebrowser_page_download in ./filebrowser.pages.inc
Callback for filebrowser_download/%node menu.
filebrowser_update_thumbnails in ./filebrowser.pages.inc

... See full list

File

./filebrowser.common.inc, line 233
Misc filebrowser common functions.

Code

function _filebrowser_node_content_load($fid) {
  if (is_array($fid)) {
    debugPrintCallingFunction();
    exit;
  }
  static $contents = array();
  if (isset($contents[$fid])) {
    return $contents[$fid];
  }
  $contents[$fid] = (array) db_query("\n     SELECT *\n     FROM {node_dir_listing_content}\n     WHERE fid = :fid", array(
    ':fid' => $fid,
  ))
    ->fetch();
  return $contents[$fid];
}