You are here

function simplenews_subscription_list_form_submit in Simplenews 6.2

Same name and namespace in other branches
  1. 5 simplenews.module \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()
1 string reference to 'simplenews_subscription_list_form_submit'
simplenews_subscription_list_form in includes/simplenews.admin.inc
Build the form for admin subscription.

File

includes/simplenews.admin.inc, line 831
Newsletter admin, subscription admin, simplenews settings

Code

function simplenews_subscription_list_form_submit($form, &$form_state) {
  if (isset($form_state['values']['operation'])) {
    $snids = array_filter($form_state['values']['snids']);
    $args = array(
      $snids,
    );
    switch ($form_state['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;
    }
  }
}