Index: patched/project/solr/project_solr.module
===================================================================
--- patched/project/solr/project_solr.module	(revision 2799)
+++ patched/project/solr/project_solr.module	(working copy)
@@ -140,7 +140,7 @@
     if (!empty($max_official_filetime)) {
       $document->ds_project_latest_release = apachesolr_date_iso($max_official_filetime);
     }
-    
+
     if (module_exists('project_usage')) {
       $weeks = variable_get('project_usage_active_weeks', array());
       $week = reset($weeks);
@@ -174,7 +174,7 @@
   return theme('item_list', $items);
 }
 
-function project_solr_browse_page($term_name) {
+function project_solr_browse_page($term_name, $text_query = '') {
   try {
     $output = '';
 
@@ -189,7 +189,7 @@
       $output .= theme('project_type_description', $parent_term);
     }
 
-    $text_query = isset($_GET['text']) ? $_GET['text'] : '';
+//    $text_query = isset($_GET['text']) ? $_GET['text'] : '';
     $filters = isset($_GET['filters']) ? $_GET['filters'] : '';
 
     $sort = isset($_GET['solrsort']) ? check_plain($_GET['solrsort']) : '';
@@ -366,7 +366,7 @@
         $unclick_link = '';
         $term = taxonomy_get_term($tid);
         $new_query = clone $query;
-        
+
         $path = $new_query->get_path();
         $options = array();
         if ($active) {
@@ -532,7 +532,7 @@
 //----------------------------------------
 
 /**
- * Perform the business logic to 
+ * Perform the business logic to
  */
 function project_solr_render_search_result($result) {
   $project = node_load($result->nid);
@@ -543,7 +543,7 @@
   if (!empty($project->project_release['releases'])) {
     $project->download_table = project_release_table($project, 'recommended', 'all', t('Version'), FALSE, FALSE);
   }
-  
+
   $project->links = array();
   $project->links['read_more'] = array(
     'title' => t('Find out more'),
@@ -575,7 +575,7 @@
 
   $response = apachesolr_static_response_cache();
   $query    = apachesolr_current_query();
-  
+
   $project_vid = _project_get_vid();
   $parent_term = db_fetch_object(db_query("SELECT t.tid, t.name, t.description FROM {term_data} t WHERE t.vid = %d AND LOWER(t.name) = LOWER('%s')", _project_get_vid(), 'modules'));
 
@@ -671,10 +671,10 @@
 }
 
 function project_solr_browse_form_submit($form, &$form_state) {
-  $query = new ProjectSolrQuery(apachesolr_get_solr(), $form_state['values']['text'], '', '');
+  $query = new ProjectSolrQuery(apachesolr_get_solr(), $form_state['values']['text'], '', '', $form_state['values']['path']);
 
   if (!empty($form_state['values']['tid'])) {
-  $query->add_filter('tid', $form_state['values']['tid']);
+    $query->add_filter('tid', $form_state['values']['tid']);
   }
 
   if (!empty($form_state['values']['api_version'])) {
@@ -691,6 +691,6 @@
       }
     }
   }
-  $query->set_solrsort(implode(' ', $solrsort));
-  $form_state['redirect'] = array($form_state['values']['path'], $query->get_url_queryvalues());
+  call_user_method_array('set_solrsort', $query, $solrsort);
+  $form_state['redirect'] = array($query->get_path(), $query->get_url_queryvalues());
 }
