You are here

function apachesolr_search_search_box_form_submit in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6.3 apachesolr_search.module \apachesolr_search_search_box_form_submit()
  2. 6 apachesolr_search.module \apachesolr_search_search_box_form_submit()
  3. 6.2 apachesolr_search.module \apachesolr_search_search_box_form_submit()

Process a block search form submission.

See also

search_box_form_submit()

File

./apachesolr_search.module, line 799
Provides a content search implementation for node content for use with the Apache Solr search application.

Code

function apachesolr_search_search_box_form_submit($form_id, $form_values) {

  // The search form relies on control of the redirect destination for its
  // functionality, so we override any static destination set in the request,
  // for example by drupal_access_denied() or drupal_not_found()
  // (see http://drupal.org/node/292565).
  if (isset($_REQUEST['destination'])) {
    unset($_REQUEST['destination']);
  }
  if (isset($_REQUEST['edit']['destination'])) {
    unset($_REQUEST['edit']['destination']);
  }
  $keys = $form_values[$form_id . '_keys'];

  // Handle Apache webserver clean URL quirks.
  if (variable_get('clean_url', '0')) {
    $keys = str_replace('+', '%2B', $keys);
  }
  return 'search/apachesolr_search/' . trim($keys);
}