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.30
diff -u -r1.1.2.30 search_by_page.module
--- search_by_page.module	24 May 2010 16:14:48 -0000	1.1.2.30
+++ search_by_page.module	28 May 2010 23:41:03 -0000
@@ -698,7 +698,7 @@
 
     return array(
       'subject' => $blocktitle,
-      'content' => drupal_get_form('search_by_page_form', $delta),
+      'content' => drupal_get_form('search_by_page_form', $delta, NULL, TRUE),
     );
   }
 }
@@ -736,7 +736,7 @@
 
   // Display a search form
 
-  $output = drupal_get_form('search_by_page_form', $environment, $keys);
+  $output = drupal_get_form('search_by_page_form', $environment, $keys, FALSE);
 
   // Get search results, if any, and display them
 
@@ -770,7 +770,7 @@
  * @ingroup forms
  * @see search_by_page_form_submit()
  */
-function search_by_page_form(&$form_state, $environment, $keys = '') {
+function search_by_page_form(&$form_state, $environment, $keys = '', $is_block = TRUE) {
 
   $form = array(
     '#action' => url(search_by_page_setting_get('page_path', $environment, 'search_pages')),
@@ -798,6 +798,11 @@
     '#value' => $environment,
   );
 
+  $form['is_block'] = array(
+    '#type' => 'value',
+    '#value' => $is_block,
+  );
+
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => $buttonlabel,
@@ -1164,6 +1169,8 @@
 
   $variables['environment'] = $variables['form']['environment']['#value'];
 
+  $variables['is_block'] = $variables['form']['is_block']['#value'];
+
   // Provide variables named after form keys so themers can print each
   // element independently.
   foreach (element_children($variables['form']) as $key) {
Index: search-by-page-form.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/search_by_page/search-by-page-form.tpl.php,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 search-by-page-form.tpl.php
--- search-by-page-form.tpl.php	11 Feb 2010 23:16:56 -0000	1.1.2.1
+++ search-by-page-form.tpl.php	28 May 2010 23:41:03 -0000
@@ -15,6 +15,7 @@
  *   - $search['hidden']: Hidden form elements. Used to validate forms when
  *     submitted.
  * - $environment: The ID number of the search environment.
+ * - $is_block: TRUE if the form is in the block, FALSE if in the page body.
  *
  * @see template_preprocess_search_by_page_form()
  */
