You are here

function sharedblocks_subscribe_delete_form_submit in Shared Blocks 7

Submit callback for subscription block delete form.

File

./sharedblocks.module, line 379

Code

function sharedblocks_subscribe_delete_form_submit($form, &$form_state) {
  $values = $form_state['values'];

  // Delte the subscription block.
  db_delete('sharedblocks')
    ->condition('id', $values['id'])
    ->execute();

  // Redirect back to the listing page.
  $form_state['redirect'] = 'admin/structure/sharedblocks/subscribe';
  drupal_set_message(t('The %name subscription block has been delete.', array(
    '%name' => $values['name'],
  )));
}