You are here

function biblio_delete_confirm_submit in Bibliography Module 7.2

Delete form confirmation page

_state

Parameters

array $form:

File

./biblio.module, line 3251

Code

function biblio_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $wrapper = biblio_wrapper($form['#biblio']);
    biblio_delete($form['#biblio']);
    watchdog('biblio', '@type: deleted %title.', array(
      '@type' => $wrapper->publication_type,
      '%title' => $wrapper->biblio_title
        ->value(),
    ));
    $types = biblio_types('biblio');
    drupal_set_message(t('@type %title has been deleted.', array(
      '@type' => $types[$wrapper->publication_type
        ->value()]->name,
      '%title' => $wrapper->biblio_title
        ->value(),
    )));
  }
  $form_state['redirect'] = '<front>';
}