? SolrPhpClient
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.142
diff -u -F^function -r1.1.2.12.2.142 apachesolr.module
--- apachesolr.module	19 May 2009 19:56:30 -0000	1.1.2.12.2.142
+++ apachesolr.module	22 May 2009 18:26:58 -0000
@@ -678,6 +678,15 @@ function apachesolr_facet_block($respons
 }
 
 /**
+ * Callback function for a content type facet block.
+ */
+function apachesolr_facet_get_nodetype($facet) {
+  $type = node_get_types('name', $facet);
+  // A disabled or missing node type returns FALSE.
+  return ($type === FALSE) ? $facet : $type;
+}
+
+/**
  * Helper function for displaying a date facet block.
  *
  * TODO: Refactor with apachesolr_facet_block().
Index: apachesolr_facets.info
===================================================================
RCS file: apachesolr_facets.info
diff -N apachesolr_facets.info
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ apachesolr_facets.info	22 May 2009 18:26:58 -0000
@@ -0,0 +1,7 @@
+; $Id$
+name = Apache Solr Facets
+description = Provides facet blocks for Apache Solr searches
+dependencies[] = apachesolr
+package = Apache Solr
+core = "6.x"
+php = 5.1.4
Index: apachesolr_facets.module
===================================================================
RCS file: apachesolr_facets.module
diff -N apachesolr_facets.module
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ apachesolr_facets.module	22 May 2009 18:26:58 -0000
@@ -0,0 +1,336 @@
+<?php
+// $Id$
+
+/**
+ * @file Provides facet blocks based on Solr search.
+ */
+
+/**
+ * Implementation of hook_apachesolr_facets().
+ *
+ * Returns an array keyed by block delta.
+ */
+function apachesolr_facets_apachesolr_facets() {
+  $facets = array();
+
+  $facets['type'] = array(
+    'info' => t('Apache Solr Facets: Filter by content type'),
+    'facet_field' => 'type',
+  );
+  $facets['uid'] = array(
+    'info' => t('Apache Solr Facets: Filter by author'),
+    'facet_field' => 'uid',
+  );
+  $facets['language'] = array(
+    'info' => t('Apache Solr Facets: Filter by language'),
+    'facet_field' => 'language',
+  );
+
+  $facets['changed'] = array(
+    'info' => t('Apache Solr Facets: Filter by updated date'),
+    'facet_field' => 'changed',
+  );
+  $facets['created'] = array(
+    'info' => t('Apache Solr Facets: Filter by post date'),
+    'facet_field' => 'created',
+  );
+
+  // A book module facet.
+  if (module_exists('book')) {
+    $facets['is_book_bid'] = array(
+      'info' => t('Apache Solr Facets: Filter by Book'),
+      'facet_field' => 'is_book_bid',
+    );
+  }
+
+  // Get taxonomy vocabulary facets.
+  if (module_exists('taxonomy')) {
+    $vocabs = taxonomy_get_vocabularies();
+    foreach ($vocabs as $vid => $vocab) {
+      // In this case the delta and facet field are the same.
+      $delta = 'im_vid_' . $vid;
+      $facets[$delta] = array(
+        'info' => t('Apache Solr Facets: Filter by taxonomy @name', array('@name' => $vocab->name)),
+        'facet_field' => $delta,
+      );
+    }
+  }
+
+  // Get CCK field facets.
+  $fields = apachesolr_cck_fields();
+  if ($fields) {
+    foreach ($fields as $name => $field) {
+      // $delta can only be 32 chars, and the CCK field name may be this
+      // long also, so we cannot add anything to it.
+      $facets[$field['field_name']] = array(
+        'info' => t('Apache Solr Facets: Filter by @field', array('@field' => $field['label'])),
+        'facet_field' => apachesolr_index_key($field),
+      );
+    }
+  }
+  return $facets;
+}
+
+/**
+ * Implementation of hook_block().
+ */
+function apachesolr_facets_block($op = 'list', $delta = 0, $edit = array()) {
+
+  switch ($op) {
+    case 'list':
+      $enabled_facets = apachesolr_get_enabled_facets('apachesolr_facets');
+      $facets = apachesolr_facets_apachesolr_facets();
+      // Add the blocks
+      $blocks = array();
+      foreach ($enabled_facets as $delta => $facet_field) {
+        if (isset($facets[$delta])) {
+          $blocks[$delta] = $facets[$delta] + array('cache' => BLOCK_CACHE_PER_PAGE,);
+        }
+      }
+      $blocks['currentsearch'] = array(
+        'info' => t('Apache Solr Facets: Current search'),
+        'cache' => BLOCK_CACHE_PER_PAGE,
+      );
+      return $blocks;
+
+    case 'view':
+      if (apachesolr_has_searched()) {
+        // Get the query and response. Without these no blocks make sense.
+        $response = apachesolr_static_response_cache();
+        if (empty($response)) {
+          return;
+        }
+        $query = apachesolr_current_query();
+
+        $facets = apachesolr_get_enabled_facets('apachesolr_facets');
+        if (empty($facets[$delta]) && ($delta != 'currentsearch')) {
+          return;
+        }
+
+        // Get information needed by the taxonomy blocks about limits.
+        $initial_limits = variable_get('apachesolr_facet_query_initial_limits', array());
+        $limit_default = variable_get('apachesolr_facet_query_initial_limit_default', 10);
+
+        // Handle taxonomy vocabulary facets
+        if ((strpos($delta, 'im_vid_') === 0) && module_exists('taxonomy')) {
+
+          if (is_object($response->facet_counts->facet_fields->$delta)) {
+            $contains_active = FALSE;
+            $terms = array();
+
+            foreach ($response->facet_counts->facet_fields->$delta as $tid => $count) {
+              if ($tid == '_empty_') {
+                // TODO - for now we don't handle facet missing.
+                continue;
+              }
+              $unclick_link = '';
+              unset($active);
+              $term = taxonomy_get_term($tid);
+              $new_query = clone $query;
+              if ($active = $query->has_filter('tid', $tid)) {
+                $contains_active = TRUE;
+                $new_query->remove_filter('tid', $term->tid);
+                $path = $new_query->get_path();
+                $querystring = $new_query->get_url_querystring();
+                $unclick_link = theme('apachesolr_unclick_link', $path, $querystring);
+              }
+              else {
+                $new_query->add_filter('tid', $term->tid);
+                $path = $new_query->get_path();
+                $querystring = $new_query->get_url_querystring();
+              }
+              $countsort = $count == 0 ? '' : 1 / $count;
+              // if numdocs == 1 and !active, don't add.
+              if ($response->response->numFound > 1 || $active) {
+                $terms[$term->vid][$active ? $countsort . $term->name : 1 + $countsort . $term->name] = theme('apachesolr_facet_item', $term->name, $count, $path, $querystring, $active, $unclick_link, $response->response->numFound);
+              }
+            }
+          }
+          $vid = substr($delta, 7);
+          $vocab = taxonomy_vocabulary_load($vid);
+          if (is_numeric($vid) && is_array($terms) && isset($terms[$vid]) && is_array($terms[$vid])) {
+            ksort($terms[$vid]);
+            $limit = isset($initial_limits['apachesolr_facets'][$delta]) ? $initial_limits['apachesolr_facets'][$delta] : $limit_default;
+            return array(
+              'subject' => t('Filter by @name', array('@name' => $vocab->name)),
+              'content' => theme('apachesolr_facet_list', $terms[$vid], $limit),
+            );
+          }
+          return;
+        }
+
+        switch ($delta) {
+          case 'currentsearch':
+            $fields = $query->get_filters();
+            $path = $query->get_path();
+            $options = array();
+            if (!$fields) {
+              $options['attributes']['class'] = 'active';
+            }
+            $links[] = apachesolr_l($query->get_query_basic(), $path, $options);
+            foreach($fields as $field) {
+              if ($field['#name']) {
+                $new_query = clone $query;
+                $new_query->remove_filter($field['#name'], $field['#value']);
+                $path = $new_query->get_path();
+                $querystring = $new_query->get_url_querystring();
+                $unclick_link = theme('apachesolr_unclick_link', $path, $querystring);
+                if (! $fielddisplay = theme("apachesolr_breadcrumb_". $field['#name'], $field['#value'])) {
+                  $fielddisplay = $field['#value'];
+                }
+                $links[] = theme('apachesolr_facet_item', $fielddisplay, NULL, $path, $querystring, $active, $unclick_link, $response->response->numFound);
+              }
+            }
+            $content = theme('apachesolr_currentsearch', $response->response->numFound, $links);
+            return array('subject' => t('Current search'), 'content' => $content);
+          case 'is_book_bid':
+            return apachesolr_facet_block($response, $query, 'apachesolr_facets', $delta, $delta, t('Filter by book'), 'apachesolr_facets_get_book');
+          case 'language':
+            return apachesolr_facet_block($response, $query, 'apachesolr_facets', $delta, $delta, t('Filter by language'), 'locale_language_name');
+           case 'uid':
+            return apachesolr_facet_block($response, $query, 'apachesolr_facets', $delta, $delta, t('Filter by author'), 'apachesolr_facets_get_username');
+          case 'type':
+            return apachesolr_facet_block($response, $query, 'apachesolr_facets', $delta, $delta, t('Filter by type'), 'apachesolr_facet_get_nodetype');
+          case 'changed':
+            return apachesolr_date_facet_block($response, $query, 'apachesolr_facets', $delta, $delta, t('Filter by modification date'));
+          case 'created':
+            return apachesolr_date_facet_block($response, $query, 'apachesolr_facets', $delta, $delta, t('Filter by post date'));
+
+          default:
+           if ($fields = apachesolr_cck_fields()) {
+            foreach ($fields as $name => $field) {
+              if ($field['field_name'] == $delta) {
+                $index_key = apachesolr_index_key($field);
+                return apachesolr_facet_block($response, $query, 'apachesolr_facets', $delta, $index_key, t('Filter by @field', array('@field' => $field['label'])));
+              }
+            }
+          }
+        }
+        break;
+      }
+      break;
+
+    case 'configure':
+      if ($delta != 'currentsearch') {
+        return apachesolr_facetcount_form('apachesolr_facets', $delta);
+      }
+      break;
+
+    case 'save':
+      if ($delta != 'currentsearch') {
+        apachesolr_facetcount_save($edit);
+      }
+      break;
+  }
+}
+
+/**
+ * Callback function for the 'Filter by book' facet block.
+ */
+function apachesolr_facets_get_book($facet, &$options) {
+  if (is_numeric($facet)) {
+    return db_result(db_query('SELECT title FROM {node} WHERE nid = %d', $facet));
+  }
+  else {
+    $options['html'] = TRUE;
+    return theme('placeholder', t('Not in any book'));
+  }
+}
+
+/**
+ * Callback function for the 'Filter by name' facet block.
+ */
+function apachesolr_facets_get_username($facet) {
+  if ($facet == 0) {
+    return variable_get('anonymous', t('Anonymous'));
+  }
+  else {
+    return db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $facet));
+  }
+}
+
+/**
+ * Implementation of hook_theme().
+ */
+function apachesolr_facets_theme() {
+  return array(
+    'apachesolr_breadcrumb_is_book_bid' => array(
+      'arguments' => array('bid' => NULL),
+    ),
+    'apachesolr_breadcrumb_uid' => array(
+      'arguments' => array('uid' => NULL),
+    ),
+    'apachesolr_breadcrumb_tid' => array(
+      'arguments' => array('tid' => NULL),
+    ),
+    'apachesolr_breadcrumb_type' => array(
+      'arguments' => array('type' => NULL),
+    ),
+    'apachesolr_breadcrumb_changed' => array(
+      'arguments' => array('type' => NULL),
+    ),
+    'apachesolr_breadcrumb_created' => array(
+      'arguments' => array('type' => NULL),
+    ),
+    'apachesolr_currentsearch' => array(
+      'arguments' => array('total_found' => NULL, 'links' => NULL),
+    ),
+  );
+}
+
+function theme_apachesolr_breadcrumb_date_range($range) {
+  if (preg_match('@[\[\{](\S+) TO (\S+)[\]\}]@', $range, $match)) {
+    return apachesolr_date_format_range($match[1], $match[2]);
+  }
+  return $range;
+}
+
+function theme_apachesolr_breadcrumb_changed($range) {
+  return theme_apachesolr_breadcrumb_date_range($range);
+}
+
+function theme_apachesolr_breadcrumb_created($range) {
+  return theme_apachesolr_breadcrumb_date_range($range);
+}
+
+/**
+ * Return the username from $uid
+ */
+function theme_apachesolr_breadcrumb_uid($uid) {
+  return apachesolr_facets_get_username($uid);
+}
+
+/**
+ * Return the term name from $tid.
+ */
+function theme_apachesolr_breadcrumb_tid($tid) {
+  $term = taxonomy_get_term($tid);
+  return $term->name;
+}
+
+/**
+ * Return the human readable text for a content type.
+ */
+function theme_apachesolr_breadcrumb_type($type) {
+  return node_get_types('name', $type);
+}
+
+/**
+ * Return the title of a book.
+ */
+function theme_apachesolr_breadcrumb_is_book_bid($bid) {
+  if (is_numeric($bid)) {
+    return db_result(db_query('SELECT title FROM {node} WHERE nid = %d', $bid));
+  }
+  else {
+    return t('Not in any book');
+  }
+}
+
+/**
+ * Return current search block contents
+ */
+function theme_apachesolr_currentsearch($total_found, $links) {
+  return theme_item_list($links, format_plural($total_found, 'Search found 1 item', 'Search found @count items'));
+}
+
Index: apachesolr_search.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.module,v
retrieving revision 1.1.2.6.2.92
diff -u -F^function -r1.1.2.6.2.92 apachesolr_search.module
--- apachesolr_search.module	14 May 2009 23:10:19 -0000	1.1.2.6.2.92
+++ apachesolr_search.module	22 May 2009 18:26:59 -0000
@@ -306,7 +306,7 @@ function apachesolr_process_response($re
       $extra[] = format_plural($doc->comment_count, '1 comment', '@count comments');
       $results[] = array(
         'link' => url($doc->path),
-        'type' => apachesolr_search_get_type($doc->type),
+        'type' => apachesolr_facet_get_nodetype($doc->type),
         'title' => $doc->title,
         'user' => theme('username', $doc),
         'date' => $doc->created,
@@ -355,259 +355,6 @@ function apachesolr_search_date_range($q
 }
 
 /**
- * Implementation of hook_apachesolr_facets().
- *
- * Returns an array keyed by block delta.
- */
-function apachesolr_search_apachesolr_facets() {
-  $facets = array();
-
-  $facets['type'] = array(
-    'info' => t('Apache Solr Search: Filter by content type'),
-    'facet_field' => 'type',
-  );
-  $facets['uid'] = array(
-    'info' => t('Apache Solr Search: Filter by author'),
-    'facet_field' => 'uid',
-  );
-  $facets['language'] = array(
-    'info' => t('Apache Solr Search: Filter by language'),
-    'facet_field' => 'language',
-  );
-
-  $facets['changed'] = array(
-    'info' => t('Apache Solr Search: Filter by updated date'),
-    'facet_field' => 'changed',
-  );
-  $facets['created'] = array(
-    'info' => t('Apache Solr Search: Filter by post date'),
-    'facet_field' => 'created',
-  );
-
-  // A book module facet.
-  if (module_exists('book')) {
-    $facets['is_book_bid'] = array(
-      'info' => t('Apache Solr Search: Filter by Book'),
-      'facet_field' => 'is_book_bid',
-    );
-  }
-
-  // Get taxonomy vocabulary facets.
-  if (module_exists('taxonomy')) {
-    $vocabs = taxonomy_get_vocabularies();
-    foreach ($vocabs as $vid => $vocab) {
-      // In this case the delta and facet field are the same.
-      $delta = 'im_vid_' . $vid;
-      $facets[$delta] = array(
-        'info' => t('Apache Solr Search: Filter by taxonomy @name', array('@name' => $vocab->name)),
-        'facet_field' => $delta,
-      );
-    }
-  }
-
-  // Get CCK field facets.
-  $fields = apachesolr_cck_fields();
-  if ($fields) {
-    foreach ($fields as $name => $field) {
-      // $delta can only be 32 chars, and the CCK field name may be this
-      // long also, so we cannot add anything to it.
-      $facets[$field['field_name']] = array(
-        'info' => t('Apache Solr Search: Filter by @field', array('@field' => $field['label'])),
-        'facet_field' => apachesolr_index_key($field),
-      );
-    }
-  }
-  return $facets;
-}
-
-/**
- * Implementation of hook_block().
- */
-function apachesolr_search_block($op = 'list', $delta = 0, $edit = array()) {
-
-  switch ($op) {
-    case 'list':
-      $enabled_facets = apachesolr_get_enabled_facets('apachesolr_search');
-      $facets = apachesolr_search_apachesolr_facets();
-      // Add the blocks
-      $blocks = array();
-      foreach ($enabled_facets as $delta => $facet_field) {
-        if (isset($facets[$delta])) {
-          $blocks[$delta] = $facets[$delta] + array('cache' => BLOCK_CACHE_PER_PAGE,);
-        }
-      }
-      $blocks['currentsearch'] = array(
-        'info' => t('Apache Solr Search: Current search'),
-        'cache' => BLOCK_CACHE_PER_PAGE,
-      );
-      return $blocks;
-
-    case 'view':
-      if (apachesolr_has_searched()) {
-        // Get the query and response. Without these no blocks make sense.
-        $response = apachesolr_static_response_cache();
-        if (empty($response)) {
-          return;
-        }
-        $query = apachesolr_current_query();
-
-        $facets = apachesolr_get_enabled_facets('apachesolr_search');
-        if (empty($facets[$delta]) && ($delta != 'currentsearch')) {
-          return;
-        }
-
-        // Get information needed by the taxonomy blocks about limits.
-        $initial_limits = variable_get('apachesolr_facet_query_initial_limits', array());
-        $limit_default = variable_get('apachesolr_facet_query_initial_limit_default', 10);
-
-        // Handle taxonomy vocabulary facets
-        if ((strpos($delta, 'im_vid_') === 0) && module_exists('taxonomy')) {
-
-          if (is_object($response->facet_counts->facet_fields->$delta)) {
-            $contains_active = FALSE;
-            $terms = array();
-
-            foreach ($response->facet_counts->facet_fields->$delta as $tid => $count) {
-              if ($tid == '_empty_') {
-                // TODO - for now we don't handle facet missing.
-                continue;
-              }
-              $unclick_link = '';
-              unset($active);
-              $term = taxonomy_get_term($tid);
-              $new_query = clone $query;
-              if ($active = $query->has_filter('tid', $tid)) {
-                $contains_active = TRUE;
-                $new_query->remove_filter('tid', $term->tid);
-                $path = $new_query->get_path();
-                $querystring = $new_query->get_url_querystring();
-                $unclick_link = theme('apachesolr_unclick_link', $path, $querystring);
-              }
-              else {
-                $new_query->add_filter('tid', $term->tid);
-                $path = $new_query->get_path();
-                $querystring = $new_query->get_url_querystring();
-              }
-              $countsort = $count == 0 ? '' : 1 / $count;
-              // if numdocs == 1 and !active, don't add.
-              if ($response->response->numFound > 1 || $active) {
-                $terms[$term->vid][$active ? $countsort . $term->name : 1 + $countsort . $term->name] = theme('apachesolr_facet_item', $term->name, $count, $path, $querystring, $active, $unclick_link, $response->response->numFound);
-              }
-            }
-          }
-          $vid = substr($delta, 7);
-          $vocab = taxonomy_vocabulary_load($vid);
-          if (is_numeric($vid) && is_array($terms) && isset($terms[$vid]) && is_array($terms[$vid])) {
-            ksort($terms[$vid]);
-            $limit = isset($initial_limits['apachesolr_search'][$delta]) ? $initial_limits['apachesolr_search'][$delta] : $limit_default;
-            return array(
-              'subject' => t('Filter by @name', array('@name' => $vocab->name)),
-              'content' => theme('apachesolr_facet_list', $terms[$vid], $limit),
-            );
-          }
-          return;
-        }
-
-        switch ($delta) {
-          case 'currentsearch':
-            $fields = $query->get_filters();
-            $path = $query->get_path();
-            $options = array();
-            if (!$fields) {
-              $options['attributes']['class'] = 'active';
-            }
-            $links[] = apachesolr_l($query->get_query_basic(), $path, $options);
-            foreach($fields as $field) {
-              if ($field['#name']) {
-                $new_query = clone $query;
-                $new_query->remove_filter($field['#name'], $field['#value']);
-                $path = $new_query->get_path();
-                $querystring = $new_query->get_url_querystring();
-                $unclick_link = theme('apachesolr_unclick_link', $path, $querystring);
-                if (! $fielddisplay = theme("apachesolr_breadcrumb_". $field['#name'], $field['#value'])) {
-                  $fielddisplay = $field['#value'];
-                }
-                $links[] = theme('apachesolr_facet_item', $fielddisplay, NULL, $path, $querystring, $active, $unclick_link, $response->response->numFound);
-              }
-            }
-            $content = theme('apachesolr_currentsearch', $response->response->numFound, $links);
-            return array('subject' => t('Current search'), 'content' => $content);
-          case 'is_book_bid':
-            return apachesolr_facet_block($response, $query, 'apachesolr_search', $delta, $delta, t('Filter by book'), 'apachesolr_search_get_book');
-          case 'language':
-            return apachesolr_facet_block($response, $query, 'apachesolr_search', $delta, $delta, t('Filter by language'), 'locale_language_name');
-           case 'uid':
-            return apachesolr_facet_block($response, $query, 'apachesolr_search', $delta, $delta, t('Filter by author'), 'apachesolr_search_get_username');
-          case 'type':
-            return apachesolr_facet_block($response, $query, 'apachesolr_search', $delta, $delta, t('Filter by type'), 'apachesolr_search_get_type');
-          case 'changed':
-            return apachesolr_date_facet_block($response, $query, 'apachesolr_search', $delta, $delta, t('Filter by modification date'));
-          case 'created':
-            return apachesolr_date_facet_block($response, $query, 'apachesolr_search', $delta, $delta, t('Filter by post date'));
-
-          default:
-           if ($fields = apachesolr_cck_fields()) {
-            foreach ($fields as $name => $field) {
-              if ($field['field_name'] == $delta) {
-                $index_key = apachesolr_index_key($field);
-                return apachesolr_facet_block($response, $query, 'apachesolr_search', $delta, $index_key, t('Filter by @field', array('@field' => $field['label'])));
-              }
-            }
-          }
-        }
-        break;
-      }
-      break;
-
-    case 'configure':
-      if ($delta != 'currentsearch') {
-        return apachesolr_facetcount_form('apachesolr_search', $delta);
-      }
-      break;
-
-    case 'save':
-      if ($delta != 'currentsearch') {
-        apachesolr_facetcount_save($edit);
-      }
-      break;
-  }
-}
-
-/**
- * Callback function for the 'Filter by book' facet block.
- */
-function apachesolr_search_get_book($facet, &$options) {
-  if (is_numeric($facet)) {
-    return db_result(db_query('SELECT title FROM {node} WHERE nid = %d', $facet));
-  }
-  else {
-    $options['html'] = TRUE;
-    return theme('placeholder', t('Not in any book'));
-  }
-}
-
-/**
- * Callback function for the 'Filter by name' facet block.
- */
-function apachesolr_search_get_username($facet) {
-  if ($facet == 0) {
-    return variable_get('anonymous', t('Anonymous'));
-  }
-  else {
-    return db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $facet));
-  }
-}
-
-/**
- * Callback function for the 'Filter by type' facet block.
- */
-function apachesolr_search_get_type($facet) {
-  $type = node_get_types('name', $facet);
-  // A disabled or missing node type returns FALSE.
-  return ($type === FALSE) ? $facet : $type;
-}
-
-/**
  * Implementation of hook_form_[form_id]_alter().
  *
  * This adds spelling suggestions to the search form.
@@ -684,89 +431,12 @@ function apachesolr_search_build_spellch
  */
 function apachesolr_search_theme() {
   return array(
-    'apachesolr_breadcrumb_is_book_bid' => array(
-      'arguments' => array('bid' => NULL),
-    ),
-    'apachesolr_breadcrumb_uid' => array(
-      'arguments' => array('uid' => NULL),
-    ),
-    'apachesolr_breadcrumb_tid' => array(
-      'arguments' => array('tid' => NULL),
-    ),
-    'apachesolr_breadcrumb_type' => array(
-      'arguments' => array('type' => NULL),
-    ),
-    'apachesolr_breadcrumb_changed' => array(
-      'arguments' => array('type' => NULL),
-    ),
-    'apachesolr_breadcrumb_created' => array(
-      'arguments' => array('type' => NULL),
-    ),
-    'apachesolr_currentsearch' => array(
-      'arguments' => array('total_found' => NULL, 'links' => NULL),
-    ),
     'apachesolr_search_snippets' => array(
       'arguments' => array('doc' => NULL, 'snippets' => NULL),
     ),
   );
 }
 
-function theme_apachesolr_breadcrumb_date_range($range) {
-  if (preg_match('@[\[\{](\S+) TO (\S+)[\]\}]@', $range, $match)) {
-    return apachesolr_date_format_range($match[1], $match[2]);
-  }
-  return $range;
-}
-
-function theme_apachesolr_breadcrumb_changed($range) {
-  return theme_apachesolr_breadcrumb_date_range($range);
-}
-
-function theme_apachesolr_breadcrumb_created($range) {
-  return theme_apachesolr_breadcrumb_date_range($range);
-}
-
-/**
- * Return the username from $uid
- */
-function theme_apachesolr_breadcrumb_uid($uid) {
-  return apachesolr_search_get_username($uid);
-}
-
-/**
- * Return the term name from $tid.
- */
-function theme_apachesolr_breadcrumb_tid($tid) {
-  $term = taxonomy_get_term($tid);
-  return $term->name;
-}
-
-/**
- * Return the human readable text for a content type.
- */
-function theme_apachesolr_breadcrumb_type($type) {
-  return node_get_types('name', $type);
-}
-
-/**
- * Return the title of a book.
- */
-function theme_apachesolr_breadcrumb_is_book_bid($bid) {
-  if (is_numeric($bid)) {
-    return db_result(db_query('SELECT title FROM {node} WHERE nid = %d', $bid));
-  }
-  else {
-    return t('Not in any book');
-  }
-}
-
-/**
- * Return current search block contents
- */
-function theme_apachesolr_currentsearch($total_found, $links) {
-  return theme_item_list($links, format_plural($total_found, 'Search found 1 item', 'Search found @count items'));
-}
-
 /**
  * Theme the highlighted snippet text for a search entry.
  *
