You are here

function flipping_book_delete_confirm_submit in Flipping Book 7

Executes flipping book deletion.

See also

flipping_book_delete_confirm()

File

includes/flipping_book.admin.inc, line 93
Flipping Book Admin UI.

Code

function flipping_book_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $flipping_book = flipping_book_load($form_state['values']['fbid']);
    flipping_book_delete($form_state['values']['fbid']);
    watchdog('content', '@type: deleted %title.', array(
      '@type' => 'flipping_book',
      '%title' => $flipping_book->title,
    ), WATCHDOG_WARNING);
    drupal_set_message(t('@type %title has been deleted.', array(
      '@type' => 'Flipping Book',
      '%title' => $flipping_book->title,
    )));
  }
  $form_state['redirect'] = FLIPPING_BOOK_MANAGEMENT_PATH;
}