You are here

function node_gallery_gallery_load in Node Gallery 6

Same name and namespace in other branches
  1. 6.3 node_gallery.module \node_gallery_gallery_load()
  2. 6.2 node_gallery.module \node_gallery_gallery_load()

File

./node_gallery.module, line 285
Node gallery module file.

Code

function node_gallery_gallery_load($nid) {
  static $galleries;
  if (empty($galleries[$nid])) {
    if (gallery_config_gateway::get_by($nid, 'id')) {
      $galleries[$nid] = new Gallery(node_load($nid));
    }
  }
  return $galleries[$nid];
}