function _node_gallery_load in Node Gallery 6
Implementation of hook_nodeapi(op='load').
File
- ./
node_gallery.module, line 206 - Node gallery module file.
Code
function _node_gallery_load(&$node) {
if (gallery_config_gateway::get_types('gallery', $node->type)) {
$node->images = gallery_gateway::get_images($node->nid);
$node->image_count = count($node->images);
}
if (gallery_config_gateway::get_types('image', $node->type)) {
$image = ImageGateway::get_file($node->nid);
if (!empty($image)) {
foreach (get_object_vars($image) as $k => $v) {
$node->{$k} = $v;
}
}
}
}