function andromeda_slideshow_add_image in Andromeda Slideshow 7.2
Same name and namespace in other branches
- 7 andromeda_slideshow.module \andromeda_slideshow_add_image()
Adds an image to a slideshow
Parameters
$slideshow: the slideshow object
$image: the image object
1 call to andromeda_slideshow_add_image()
- andromeda_slideshow_image_form_submit in includes/
andromeda_slideshow.forms.inc - Submit handler for andromeda_slideshow_image_form
File
- ./
andromeda_slideshow.module, line 488 - Slideshow for the Andromeda (http://drupal.org/project/andromeda) Theme
Code
function andromeda_slideshow_add_image($slideshow, $image) {
if (!empty($slideshow->sid) && !empty($image->siid)) {
$fields = array(
'sid' => $slideshow->sid,
'siid' => $image->siid,
'position' => $image->position,
);
$query = db_insert('slideshows_index')
->fields($fields)
->execute();
}
}