? apachesolr-5.x-1.0-alpha3-solrflare.tar.gz
? default_apachesolr_results.path
? failure_fallback.patch
? apachesolr/failure_fallback.patch
Index: apachesolr/apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.20
diff -u -p -r1.1.2.20 apachesolr.module
--- apachesolr/apachesolr.module	20 Jul 2008 10:33:15 -0000	1.1.2.20
+++ apachesolr/apachesolr.module	14 Aug 2008 04:09:43 -0000
@@ -59,6 +59,13 @@ function apachesolr_settings() {
     '#options' => $options,
     '#description' => t('The number of results that will be shown per page.'),
     );
+  $form['apachesolr_default_search'] = array(
+    '#type' => 'radios',
+    '#title' => t('Default search to:'),
+    '#options' => array('apachesolr'=>t('Apachesolr Search'), 'drupal'=>t('Drupal Search')),
+    '#default_value' => variable_get('apachesolr_default_search', 'drupal'),
+    '#description' => t('Search results will default to the Content tab (normal Drupal) or the Search tab (ApacheSolr)')
+    );  
   return system_settings_form($form);
 }
 
@@ -604,6 +611,17 @@ function apachesolr_block($op = 'list', 
 }
 
 function apachesolr_form_alter($form_id, &$form) {
+  //As per Apachesolr setting "apachesolr_default_search",
+  //display the Apachesolr "Search" tab instead of the Drupal "Content" tab 
+  if ($form['#base'] == 'search_box_form' && variable_get('apachesolr_default_search','drupal') == 'apachesolr') {    
+    $form['#submit'] = array();
+    $form['#submit']['search_form_submit'] = array();
+    $form['module']['#value'] = 'apachesolr_search';
+    $form['module']['#type'] = 'hidden';
+    $form['processed_keys'] = $form['search_theme_form_keys'];    
+    $form['processed_keys']['#weight'] = -1;    
+    unset($form['search_theme_form_keys']);
+  }
   $arg = arg(1);
   $alias = drupal_lookup_path('alias', "search/{$arg}");
   // Ok, this really sucks. I want a way to know whether the action of the form
