You are here

function simplenews_subscription_admin in Simplenews 5

Same name and namespace in other branches
  1. 6.2 includes/simplenews.admin.inc \simplenews_subscription_admin()
  2. 6 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.module, line 1909

Code

function simplenews_subscription_admin() {

  // Deleting subscriptions requires delete confirmation. This is handled with a different form
  if ($_POST['operation'] == 'delete' && $_POST['snids']) {
    if ($_REQUEST['destination']) {
      $destination = drupal_get_destination();
      unset($_REQUEST['destination']);
    }
    $_SESSION['simplenews_subscriptions_delete'] = $_POST['snids'];

    // Note: we redirect from admin/content/newsletters/users to admin/content/newsletters/subscriptions/delete to make the tabs disappear.
    drupal_goto("admin/content/newsletters/subscriptions/delete", $destination);
  }

  // Call the filter form first, to allow for the form_values array to be populated.
  $output = drupal_get_form('simplenews_subscription_filter_form');
  $output .= drupal_get_form('simplenews_subscription_list_form');
  return $output;
}