function finder_search_preprocess_finder_results in Finder 6
Same name and namespace in other branches
- 7 modules/finder_search/finder_search.module \finder_search_preprocess_finder_results()
Intervene before theme function.
Kind of like a template preprocess, except not for a template.
See also
finder_search_theme_registry_alter()
1 string reference to 'finder_search_preprocess_finder_results'
- finder_search_theme_registry_alter in modules/
finder_search/ finder_search.module - Implementation of hook_theme_registry_alter().
File
- modules/
finder_search/ finder_search.module, line 81 - The finder search module.
Code
function finder_search_preprocess_finder_results($results, $finder, $keywords, $pager, $params, $form_state, $no_results) {
global $theme_info;
$theme_funcs = variable_get('finder_search_finder_results_theme', array());
$theme_func = !empty($theme_funcs[$theme_info->name]) ? $theme_funcs[$theme_info->name] : 'theme_finder_results';
if ($finder->settings['advanced']['search'] && empty($results)) {
$keys = array();
foreach ($keywords as $finder_element_id => $finder_element_keywords) {
foreach ((array) $finder_element_keywords as $keyword) {
$keys[] = $keyword;
}
}
$results_array = finder_search_get_result(implode(' ', $keys), $finder->settings['advanced']['search_tab']);
$results = theme('finder_search_results', $results_array, $finder, $form_state, $no_results);
// search module has it's own pager
$pager = 0;
}
return $theme_func($results, $finder, $keywords, $pager, $params, $form_state, $no_results);
}