You are here

function subscriptions_delete_form_submit in Subscriptions 6

Same name and namespace in other branches
  1. 5.2 subscriptions.module \subscriptions_delete_form_submit()
  2. 7 subscriptions.module \subscriptions_delete_form_submit()
  3. 2.0.x subscriptions.module.old.php \subscriptions_delete_form_submit()

Delete Subscription form submit handler.

1 string reference to 'subscriptions_delete_form_submit'
subscriptions_delete_form in ./subscriptions.module
Provide the form definition for deleting subscriptions via s/del/... (aka subscriptions/rem/...) link.

File

./subscriptions.module, line 458
Subscriptions module.

Code

function subscriptions_delete_form_submit($form, &$form_state) {
  db_query("DELETE FROM {subscriptions} WHERE module = '%s' AND field = '%s' AND value = '%s' AND author_uid = %d AND recipient_uid = %d", $form_state['values']['data']);
  drupal_set_message(t('Your subscription was deactivated.'));
  $form_state['redirect'] = '<front>';
}