### Eclipse Workspace Patch 1.0 #P drupal core Index: modules/search/search.api.php =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.api.php,v retrieving revision 1.10 diff -u -r1.10 search.api.php --- modules/search/search.api.php 12 Jun 2009 08:39:38 -0000 1.10 +++ modules/search/search.api.php 20 Jun 2009 18:37:56 -0000 @@ -198,6 +198,34 @@ } } +/** + * Override the rendering of search results. + * + * Modules may implement this hook in order to override the default function + * theme_search_page() to display search results for its own custom search. + * + * As a result of this, the module must also implement hook_search(). + * + * @see theme_search_page() + * + * @param $results + * An array of results + * @return + * An HTML string containing the formatted search results + */ +function hook_search_page($results) { + $output = '
'; + + foreach ($results as $entry) { + $output .= theme('search_result', $entry, $type); + } + $output .= '
'; + $output .= theme('pager', NULL, 10, 0); + + return $output; +} + + /** * Preprocess text for the search index. *