You are here

function simplenews_subscription_list_form_submit in Simplenews 5

Same name and namespace in other branches
  1. 6.2 includes/simplenews.admin.inc \simplenews_subscription_list_form_submit()
  2. 6 simplenews.admin.inc \simplenews_subscription_list_form_submit()
  3. 7.2 includes/simplenews.admin.inc \simplenews_subscription_list_form_submit()
  4. 7 includes/simplenews.admin.inc \simplenews_subscription_list_form_submit()

Submit the subscription administration update form.

File

./simplenews.module, line 1993

Code

function simplenews_subscription_list_form_submit($form_id, $form_values) {
  if (isset($form_values['operation'])) {
    $snids = array_filter($form_values['snids']);
    $args = array(
      $snids,
    );
    switch ($form_values['operation']) {
      case 'activate':
        call_user_func_array('simplenews_activate_subscription', $args);
        drupal_set_message(t('The update has been performed.'));
        break;
      case 'inactivate':
        call_user_func_array('simplenews_inactivate_subscription', $args);
        drupal_set_message(t('The update has been performed.'));
        break;
    }
  }
}