You are here

function search_log_submit in Search Log 6

Process standard search forms to capture keys.

1 string reference to 'search_log_submit'
search_log_form_alter in ./search_log.module
Implementation of hook_form_alter().

File

./search_log.module, line 109
Replaces default report of top search phrases.

Code

function search_log_submit($form, &$form_state) {
  $keys = NULL;
  $module = isset($form_state['values']['module']) ? $form_state['values']['module'] : 'node';
  if (isset($form_state['values']['processed_keys'])) {
    $keys = $form_state['values']['processed_keys'];
  }
  elseif (isset($form_state['values']['search_theme_form'])) {
    $keys = $form_state['values']['search_theme_form'];
  }
  elseif (isset($form_state['values']['search_block_form'])) {
    $keys = $form_state['values']['search_block_form'];
  }
  if ($keys) {
    search_log($keys, $module);
  }
}