You are here

function bean_delete_revision_confirm_submit in Bean (for Drupal 7) 7

Delete a bean revisiosn

File

includes/bean.pages.inc, line 516
Bean Functions

Code

function bean_delete_revision_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $bean = $form['#bean'];
    bean_delete_revision($bean->vid);
    watchdog('bean', '@type: deleted %title revision %vid.', array(
      '%vid' => $bean->vid,
      '@type' => $bean
        ->typeName(),
      '%title' => $bean
        ->label(),
    ));
    drupal_set_message(t('@type %title revision %vid has been deleted.', array(
      '%vid' => $bean->vid,
      '@type' => $bean
        ->typeName(),
      '%title' => $bean
        ->label(),
    )));
  }
}