function notifications_subscription_base_form_submit in Notifications 6.4
Same name and namespace in other branches
- 7 notifications.pages.inc \notifications_subscription_base_form_submit()
Save edited subscription
1 call to notifications_subscription_base_form_submit()
- notifications_subscription_form_submit in ./
notifications.module - Main subscriptions form submit
File
- ./
notifications.pages.inc, line 461 - User pages for Notifications
Code
function notifications_subscription_base_form_submit($form, &$form_state) {
$subscription = Notifications_Subscription::build_submission($form_state);
switch ($form_state['values']['op']) {
case t('Save'):
case t('Subscribe'):
case t('Create subscription'):
// We are updating or creating a new subscription
notifications_submit_subscription($subscription);
break;
case t('Delete'):
notifications_subscription_delete($subscription->sid);
drupal_set_message(t('Your subscription has been deleted.'));
$form_state['redirect'] = 'user/' . $subscription->uid . '/notifications';
break;
}
}