You are here

function biblio_search_form_submit in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 includes/biblio.pages.inc \biblio_search_form_submit()
  2. 7 includes/biblio.pages.inc \biblio_search_form_submit()
  3. 7.2 includes/biblio.pages.inc \biblio_search_form_submit()

_state

Parameters

$form:

Return value

unknown_type

File

./biblio.pages.inc, line 859

Code

function biblio_search_form_submit($form, &$form_state) {
  $keys = $form_state['values']['keys'];
  if ($keys != '') {
    $_SESSION['biblio_filter'] = array(
      array(
        'search',
        '',
        $keys,
      ),
    );
    $base = variable_get('biblio_base', 'biblio');
    $form_state['redirect'] = $base;
  }
  else {

    // No keywords. Remove former search keys if any. Leaves other filters intact.
    if (_get_biblio_search_filter()) {
      $_SESSION['biblio_filter'] = array();
    }
  }
}