static function ImageGateway::get_file in Node Gallery 6
2 calls to ImageGateway::get_file()
- node_gallery_list in ./
node_gallery.pages.inc - @file Node gallery pages.
- _node_gallery_load in ./
node_gallery.module - Implementation of hook_nodeapi(op='load').
File
- ./
node_gallery.model.inc, line 232 - Node gallery module.
Class
Code
static function get_file($nids) {
$nids2 = is_numeric($nids) ? array(
$nids,
) : (array) $nids;
$result = db_query("SELECT i.*, f.* FROM {ng_images} i INNER JOIN {files} f ON i.fid = f.fid WHERE i.nid \n IN (" . db_placeholders($nids2) . ")", $nids2);
while ($r = db_fetch_array($result)) {
$items[$r['nid']] = new Image($r);
}
return is_numeric($nids) ? $items[$nids] : $items;
}