You are here

function simplenews_set_filter in Simplenews 5

Store filter values in session var

Parameters

$type identification string:

$form_values array of values to be stored:

1 call to simplenews_set_filter()
simplenews_admin_news_submit in ./simplenews.module

File

./simplenews.module, line 1666

Code

function simplenews_set_filter($type, $form_values) {
  if (empty($_SESSION[$type])) {
    $_SESSION[$type] = 'all';
  }
  $op = $form_values['op'];
  if ($op == t('Filter') && isset($form_values['filter'])) {
    $_SESSION[$type] = $form_values['filter'];
  }
}