You are here

function Gallery::get_images in Node Gallery 6

File

./node_gallery.model.inc, line 160
Node gallery module.

Class

Gallery

Code

function get_images() {
  if (empty($this->images)) {
    $result = db_query("SELECT nid FROM {ng_images} WHERE gid = %d", $this->nid);
    while ($r = db_fetch_array($result)) {
      $nids[] = $r['nid'];
    }
    if (!empty($nids)) {
      $this->images = ImageGateway::find_details($nids);
      $this->image_count = count($this->images);
    }
  }
  return $this->images;
}