You are here

function node_gallery_get_image_file in Node Gallery 6.2

1 call to node_gallery_get_image_file()
node_gallery_nodeapi in ./node_gallery.module
Implementation of hook_nodeapi().

File

./node_gallery.inc, line 222
Node gallery models

Code

function node_gallery_get_image_file($node) {
  $image = db_fetch_object(db_query("SELECT i.*, f.* FROM {node_galleries} i INNER JOIN {files} f ON i.fid = f.fid WHERE i.nid = %d", $node->nid));

  // We have to unset the uid from the files table or else the node uid is
  // lost.  See http://drupal.org/node/637958
  unset($image->uid);
  return $image;
}