function node_gallery_set_image_is_cover_field in Node Gallery 6.3
If the image is the cover image for a gallery, it sets ->is_cover = 1.
Parameters
$image: A reference to the image node object.
1 call to node_gallery_set_image_is_cover_field()
- node_gallery_load_image in ./
node_gallery.inc - Populates a node object with the node gallery image attributes.
File
- ./
node_gallery.inc, line 550 - Shared functions for node_gallery
Code
function node_gallery_set_image_is_cover_field(&$image) {
$sql = "SELECT 1 FROM {node_gallery_galleries} where cover_image = %d";
$image->is_cover = db_result(db_query($sql, $image->nid));
}