Index: search_by_page.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/search_by_page/search_by_page.module,v
retrieving revision 1.1.2.26
diff -u -r1.1.2.26 search_by_page.module
--- search_by_page.module	7 Apr 2010 21:11:57 -0000	1.1.2.26
+++ search_by_page.module	20 May 2010 19:37:52 -0000
@@ -745,15 +745,16 @@
     watchdog('search_by_page', '%keys', array('%keys' => $keys),
       WATCHDOG_NOTICE, l(t('results'), $path . '/' . $keys));
 
+    $entered_keys = $keys;
     $keys = search_query_insert($keys, 'environment', $environment);
     $results = search_data($keys, 'search_by_page');
 
     if ($results) {
-      $results = theme('box', t('Search results'), $results);
+      $title = theme('search_by_page_results_title', $entered_keys);
+      $results = theme('box', $title, $results);
     }
     else {
-      $results = theme('box', t('Your search yielded no results'),
-        search_help('search#noresults', drupal_help_arg()));
+      $results = theme('search_by_page_no_results', $entered_keys);
     }
 
     $output .= $results;
@@ -1131,6 +1132,12 @@
       'arguments' => array('form' => NULL),
       'template' => 'search-by-page-form',
     ),
+    'search_by_page_results_title' => array(
+      'arguments' => array('keys' => ''),
+    ),
+    'search_by_page_no_results' => array(
+      'arguments' => array('keys' => ''),
+    ),
   );
 }
 
@@ -1172,6 +1179,27 @@
 }
 
 /**
+ * Returns the title of the results section of the search results page.
+ *
+ * @param $keys
+ *   The keywords being searched for.
+ */
+function theme_search_by_page_results_title($keys = '') {
+  return t('Search results');
+}
+
+/**
+ * Themes a page saying there are no search results.
+ *
+ * @param $keys
+ *   The keywords being searched for.
+ */
+function theme_search_by_page_no_results($keys) {
+  return theme('box', t('Your search yielded no results'),
+    search_help('search#noresults', drupal_help_arg()));
+}
+
+/**
  * Implementation of hook_sbp_delete_environment().
  *
  * Removes the environment from settings, Search by Page database, and
