function advanced_help_search_form_submit in Advanced Help 6
Same name and namespace in other branches
- 5 advanced_help.module \advanced_help_search_form_submit()
- 7 advanced_help.module \advanced_help_search_form_submit()
Process a search form submission.
1 string reference to 'advanced_help_search_form_submit'
- advanced_help_search_form in ./
advanced_help.module - Form builder callback to build the search form.
File
- ./
advanced_help.module, line 328 - Pluggable system to provide advanced help facilities for Drupal and modules.
Code
function advanced_help_search_form_submit($form, &$form_state) {
$keys = $form_state['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) {
$form_state['redirect'] = array(
'advanced_help/search/' . $keys,
'popup=true',
);
}
else {
$form_state['redirect'] = 'advanced_help/search/' . $keys;
}
}