You are here

function advanced_help_search_form_submit in Advanced Help 5

Same name and namespace in other branches
  1. 6 advanced_help.module \advanced_help_search_form_submit()
  2. 7 advanced_help.module \advanced_help_search_form_submit()

Process a search form submission.

File

./advanced_help.module, line 286
advanced_help.module

Code

function advanced_help_search_form_submit($form, $form_values) {
  $keys = $form_values['processed_keys'];
  if ($keys == '') {
    form_set_error('keys', t('Please enter some keywords.'));
    return;
  }
  $popup = !empty($_GET['popup']) && user_access('view advanced help popup');
  if ($popup) {
    return array(
      'advanced_help/search/' . $keys,
      'popup=true',
    );
  }
  else {
    return 'advanced_help/search/' . $keys;
  }
}