cvs diff: Diffing modules/search
Index: modules/search/search-results.tpl.php
===================================================================
RCS file: /Users/wright/drupal/local_repo/drupal/modules/search/search-results.tpl.php,v
retrieving revision 1.3
diff -u -p -r1.3 search-results.tpl.php
--- modules/search/search-results.tpl.php	30 Dec 2008 16:43:18 -0000	1.3
+++ modules/search/search-results.tpl.php	12 Dec 2009 18:44:17 -0000
@@ -21,7 +21,13 @@
  * @see template_preprocess_search_results()
  */
 ?>
-<dl class="search-results <?php print $type; ?>-results">
-  <?php print $search_results; ?>
-</dl>
-<?php print $pager; ?>
+<?php if ($search_results) : ?>
+  <h2><?php print t('Search results');?></h2>
+  <dl class="search-results <?php print $type; ?>-results">
+    <?php print $search_results; ?>  
+  </dl>
+  <?php print $pager; ?>
+<?php else : ?>
+  <h2><?php print t('Your search yielded no results');?></h2>
+  <?php print search_help('search#noresults', drupal_help_arg()); ?>
+<?php endif; ?>
Index: modules/search/search.module
===================================================================
RCS file: /Users/wright/drupal/local_repo/drupal/modules/search/search.module,v
retrieving revision 1.328
diff -u -p -r1.328 search.module
--- modules/search/search.module	6 Dec 2009 17:31:49 -0000	1.328
+++ modules/search/search.module	12 Dec 2009 18:42:49 -0000
@@ -968,13 +968,11 @@ function search_data($keys = NULL, $type
   if (isset($keys)) {
     if (module_hook($type, 'search_execute')) {
       $results = module_invoke($type, 'search_execute', $keys);
-      if (isset($results) && is_array($results) && count($results)) {
-        if (module_hook($type, 'search_page')) {
-          return module_invoke($type, 'search_page', $results);
-        }
-        else {
-          return theme('search_results', array('results' => $results, 'type' => $type));
-        }
+      if (module_hook($type, 'search_page')) {
+        return module_invoke($type, 'search_page', $results);
+      }
+      else {
+        return theme('search_results', array('results' => $results, 'type' => $type));
       }
     }
   }
Index: modules/search/search.pages.inc
===================================================================
RCS file: /Users/wright/drupal/local_repo/drupal/modules/search/search.pages.inc,v
retrieving revision 1.12
diff -u -p -r1.12 search.pages.inc
--- modules/search/search.pages.inc	9 Oct 2009 01:00:03 -0000	1.12
+++ modules/search/search.pages.inc	12 Dec 2009 18:42:49 -0000
@@ -35,8 +35,7 @@ function search_view($type = 'node') {
       $build['search_form'] = drupal_get_form('search_form', NULL, $keys, $type);
       $build['search_results'] = array(
         '#theme' => 'search_results_listing',
-        '#title' => empty($results) ? t('Your search yielded no results') : t('Search results'),
-        '#content' => empty($results) ? search_help('search#noresults', drupal_help_arg()) : $results,
+        '#content' => $results,
       );
 
       return $build;
