function node_gallery_gallery_load in Node Gallery 6.2
Same name and namespace in other branches
- 6.3 node_gallery.module \node_gallery_gallery_load()
- 6 node_gallery.module \node_gallery_gallery_load()
File
- ./
node_gallery.module, line 491 - Node gallery module file
Code
function node_gallery_gallery_load($nid) {
$types = node_gallery_get_types('all');
if (is_numeric($nid)) {
$node = node_load($nid);
//is the current node used in any ng relationships?
if (in_array($node->type, $types)) {
return $node;
}
else {
// this is not a ng node
return FALSE;
}
}
return FALSE;
/* static $galleries;
if (empty($galleries[$nid])) {
$galleries[$nid] = node_load($nid);
//this is a gallery type;
if (in_array($galleries[$nid]->type, (array)node_gallery_get_types())) {
return $galleries[$nid];
}
}*/
}