You are here

function andromeda_slideshow_disable_slideshow in Andromeda Slideshow 7.2

Same name and namespace in other branches
  1. 7 includes/andromeda_slideshow.inc \andromeda_slideshow_disable_slideshow()

Disables a slideshow

Parameters

$sid: The slideshow sid

$redirect: path to redirect to after a slideshow is disabled

1 string reference to 'andromeda_slideshow_disable_slideshow'
andromeda_slideshow_menu in ./andromeda_slideshow.module
Implements hook_menu().

File

includes/andromeda_slideshow.inc, line 57
Helper functions for Andromeda Slideshow

Code

function andromeda_slideshow_disable_slideshow($sid, $redirect = FALSE) {
  $slideshow = andromeda_slideshow_load($sid);
  $slideshow->settings['status'] = 0;

  //save the slideshow
  $slideshow = andromeda_slideshow_save_slideshow($slideshow);

  //redirect if set
  if ($redirect) {
    drupal_goto($redirect);
  }
  return $slideshow;
}