You are here

function simplenews_subscription_admin in Simplenews 6

Same name and namespace in other branches
  1. 5 simplenews.module \simplenews_subscription_admin()
  2. 6.2 includes/simplenews.admin.inc \simplenews_subscription_admin()

Menu callback: subscription administration.

1 string reference to 'simplenews_subscription_admin'
simplenews_menu in ./simplenews.module
Implementation of hook_menu().

File

./simplenews.admin.inc, line 633
Newsletter admin, subscription admin, simplenews settings

Code

function simplenews_subscription_admin($form_state) {

  // Delete subscriptions requires delete confirmation. This is handled with a different form
  if (isset($form_state['post']['operation']) && $form_state['post']['operation'] == 'delete' && isset($form_state['post']['snids'])) {
    $destination = drupal_get_destination();
    $_SESSION['simplenews_subscriptions_delete'] = $form_state['post']['snids'];

    // Note: we redirect from admin/content/simplenews/users to admin/content/simplenews/subscriptions/delete to make the tabs disappear.
    drupal_goto("admin/content/simplenews/subscriptions/delete", $destination);
  }
  $form = simplenews_subscription_filter_form();
  $form['admin'] = simplenews_subscription_list_form();
  return $form;
}