function andromeda_slideshow_enable_slideshow in Andromeda Slideshow 7.2
Same name and namespace in other branches
- 7 includes/andromeda_slideshow.inc \andromeda_slideshow_enable_slideshow()
Enables a slideshow
Parameters
$sid: The slideshow sid
$redirect: path to redirect to after a slideshow is enabled
1 string reference to 'andromeda_slideshow_enable_slideshow'
- andromeda_slideshow_menu in ./
andromeda_slideshow.module - Implements hook_menu().
File
- includes/
andromeda_slideshow.inc, line 33 - Helper functions for Andromeda Slideshow
Code
function andromeda_slideshow_enable_slideshow($sid, $redirect = FALSE) {
$slideshow = andromeda_slideshow_load($sid);
$slideshow->settings['status'] = 1;
//save the slideshow
$slideshow = andromeda_slideshow_save_slideshow($slideshow);
//redirect if set
if ($redirect) {
drupal_goto($redirect);
}
return $slideshow;
}