Index: apachesolr.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.admin.inc,v
retrieving revision 1.1.2.32
diff -u -p -r1.1.2.32 apachesolr.admin.inc
--- apachesolr.admin.inc	15 Aug 2009 07:33:02 -0000	1.1.2.32
+++ apachesolr.admin.inc	15 Nov 2009 06:49:58 -0000
@@ -11,9 +11,11 @@ function apachesolr_settings() {
 
   // Perform a check to ensure the server is there
   if (empty($_POST)) {
-    $requirements = apachesolr_requirements('runtime');
-    $status = $requirements['apachesolr']['severity'] == 2 ? 'error' : 'status';
-    drupal_set_message($requirements['apachesolr']['value'], $status);
+    module_load_include('install', 'apachesolr');
+    foreach (apachesolr_requirements('runtime') as $requirement) {
+      $status = $requirement['severity'] == REQUIREMENT_ERROR ? 'error' : 'status';
+      drupal_set_message($requirement['title'] . ': ' . $requirement['value'], $status);
+    }
   }
 
   $form['apachesolr_host'] = array(
Index: apachesolr.index.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.index.inc,v
retrieving revision 1.1.2.13
diff -u -p -r1.1.2.13 apachesolr.index.inc
--- apachesolr.index.inc	14 Oct 2009 19:08:19 -0000	1.1.2.13
+++ apachesolr.index.inc	15 Nov 2009 06:49:58 -0000
@@ -16,25 +16,13 @@ function apachesolr_add_node_document(&$
 }
 
 /**
- * Strip control characters that cause Jetty/Solr to fail.
- */
-function apachesolr_strip_ctl_chars($text) {
-  // See:  http://w3.org/International/questions/qa-forms-utf-8.html
-  // Printable utf-8 does not include any of these chars below x7F
-  return preg_replace('@[\x00-\x08\x0B\x0C\x0E-\x1F]@', ' ', $text);
-}
-
-/**
  * Strip html tags and also control characters that cause Jetty/Solr to fail.
  */
 function apachesolr_clean_text($text) {
   // Add spaces before stripping tags to avoid running words together.
   $text = filter_xss(str_replace(array('<', '>'), array(' <', '> '), $text), array());
   // Decode entities and then make safe any < or > characters.
-  $text = htmlspecialchars(html_entity_decode($text, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8');
-  // We must strip low bytes second in case there was an encoded
-  // low-byte character.
-  return apachesolr_strip_ctl_chars($text);
+  return htmlspecialchars(html_entity_decode($text, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8');
 }
 
 /**
@@ -79,7 +67,6 @@ function apachesolr_node_to_document($ni
       }
     }
     $text .= "\n\n" . implode(' ', $extra);
-    $text = apachesolr_strip_ctl_chars($text);
 
     $document = new Apache_Solr_Document();
     $document->id = apachesolr_document_id($node->nid);
@@ -99,13 +86,13 @@ function apachesolr_node_to_document($ni
     }
     $document->body = apachesolr_clean_text($text);
     $document->type  = $node->type;
-    $document->type_name = apachesolr_strip_ctl_chars(node_get_types('name', $node));
+    $document->type_name = node_get_types('name', $node);
     $document->created = apachesolr_date_iso($node->created);
     $document->changed = apachesolr_date_iso($node->changed);
     $last_change = (isset($node->last_comment_timestamp) && $node->last_comment_timestamp > $node->changed) ? $node->last_comment_timestamp : $node->changed;
     $document->last_comment_or_change = apachesolr_date_iso($last_change);
     $document->comment_count = isset($node->comment_count) ? $node->comment_count : 0;
-    $document->name = apachesolr_strip_ctl_chars($node->name);
+    $document->name = $node->name;
 
     $path = 'node/' . $node->nid;
     $document->url = url($path, array('absolute' => TRUE));
@@ -118,7 +105,7 @@ function apachesolr_node_to_document($ni
       $language = empty($node->language) ? '' : $node->language;
       $output = drupal_get_path_alias($path, $language);
       if ($output && $output != $path) {
-        $document->path_alias = apachesolr_strip_ctl_chars($output);
+        $document->path_alias = $output;
       }
     }
 
@@ -314,7 +301,7 @@ function apachesolr_nodeapi_mass_update(
   $time = time();
   try {
     $solr = apachesolr_get_solr();
-    $solr->deleteMultipleById($ids);
+    $solr->deleteByMultipleIds($ids);
     apachesolr_index_updated($time);
     foreach ($nodes as $node) {
       // There was no exception, so update the table.
@@ -340,7 +327,7 @@ function apachesolr_nodeapi_mass_delete(
   }
   try {
     $solr = apachesolr_get_solr();
-    $solr->deleteMultipleById($ids);
+    $solr->deleteByMultipleIds($ids);
     apachesolr_index_updated($time);
     // There was no exception, so update the table.
     db_query("DELETE FROM {apachesolr_search_node} WHERE nid  IN (" . db_placeholders($nids) . ")", $nids);
Index: apachesolr.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.install,v
retrieving revision 1.1.4.21
diff -u -p -r1.1.4.21 apachesolr.install
--- apachesolr.install	24 Jul 2009 17:37:43 -0000	1.1.4.21
+++ apachesolr.install	15 Nov 2009 06:49:58 -0000
@@ -7,6 +7,76 @@
  */
 
 /**
+ * Implementation of hook_requirements().
+ */
+function apachesolr_requirements($phase) {
+  $requirements = array();
+  $file_exists = file_exists(dirname(__FILE__) . '/SolrPhpClient/Apache/Solr/Service.php');
+  // Ensure translations don't break at install time
+  $t = get_t();
+  if ($phase == 'runtime' && $file_exists) {
+    $host = variable_get('apachesolr_host', 'localhost');
+    $port = variable_get('apachesolr_port', 8983);
+    $path = variable_get('apachesolr_path', '/solr');
+    $ping = FALSE;
+    try {
+      $solr = apachesolr_get_solr();
+      $ping = @$solr->ping(variable_get('apachesolr_ping_timeout', 4));
+      // If there is no $solr object, there is no server available, so don't continue.
+      if (!$ping) {
+        throw new Exception(t('No Solr instance available when checking requirements.'));
+      }
+    }
+    catch (Exception $e) {
+      watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    }
+    $value =  $ping ? $t('Your site has contacted the Apache Solr server.') : $t('Your site was unable to contact the Apache Solr server.');
+    $severity = $ping ? REQUIREMENT_OK : REQUIREMENT_ERROR;
+    $description = theme('item_list', array($t('Host: %host', array('%host' => $host)),
+                        $t('Port: %port', array('%port' => $port)),
+                        $t('Path: %path', array('%path' => $path))));
+    $requirements['apachesolr'] = array(
+      'title' => $t('Apache Solr'),
+      'value' => $value,
+      'description' => $description,
+      'severity' => $severity,
+    );
+  }
+  // All phases
+  $title = $t('Apache Solr PHP CLient Library');
+  if ($file_exists) {
+    $expected_revision = '$Revision: 22 $';
+    require_once 'SolrPhpClient/Apache/Solr/Service.php';
+    $revision = defined('Apache_Solr_Service::SVN_REVISION') ? Apache_Solr_Service::SVN_REVISION : '';
+    if ($revision == $expected_revision) {
+      $severity = REQUIREMENT_OK;
+      $value = $t('Correct version "@expected".', array('@expected' => $expected_revision));
+      $description = NULL;
+    }
+    else {
+      $value = $t('Incorrect version "@version". See the instructions in README.txt.', array('@version' => $revision));
+      $description = $t('The version of the library in the SolrPhpClient directory is "@version" compared to the expected "@expected"', array('@version' => $revision, '@expected' => $expected_revision));
+      $severity = REQUIREMENT_ERROR;
+    }
+    $requirements['SolrPhpClient'] = array(
+      'title' => $title,
+      'value' => $value,
+      'description' => $description,
+      'severity' => $severity,
+    );
+  }
+  else {
+    $requirements['SolrPhpClient'] = array(
+        'title' => $title,
+        'value' => $t('<em>Missing</em>.  See the instructions in README.txt'),
+        'description' => $t('The Solr PHP library must be present in a sub-directory named SolrPhpClient.'),
+        'severity' => REQUIREMENT_ERROR,
+    );
+  }
+  return $requirements;
+}
+
+/**
  * Implementation of hook_install().
  */
 function apachesolr_install() {
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.167
diff -u -p -r1.1.2.12.2.167 apachesolr.module
--- apachesolr.module	14 Oct 2009 19:08:19 -0000	1.1.2.12.2.167
+++ apachesolr.module	15 Nov 2009 06:49:58 -0000
@@ -115,43 +115,6 @@ function apachesolr_failure($search_name
 }
 
 /**
- * Implementation of hook_requirements().
- */
-function apachesolr_requirements($phase) {
-  // Ensure translations don't break at install time
-  $t = get_t();
-  if ($phase == 'runtime') {
-    $host = variable_get('apachesolr_host', 'localhost');
-    $port = variable_get('apachesolr_port', 8983);
-    $path = variable_get('apachesolr_path', '/solr');
-    $ping = FALSE;
-    try {
-      $solr = apachesolr_get_solr();
-      $ping = @$solr->ping(variable_get('apachesolr_ping_timeout', 4));
-      // If there is no $solr object, there is no server available, so don't continue.
-      if (!$ping) {
-        throw new Exception(t('No Solr instance available when checking requirements.'));
-      }
-    }
-    catch (Exception $e) {
-      watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
-    }
-    $value =  $ping ? $t('Your site has contacted the Apache Solr server.') : $t('Your site was unable to contact the Apache Solr server.');
-    $severity = $ping ? 0: 2;
-    $description = theme('item_list', array($t('Host: %host', array('%host' => $host)),
-                        $t('Port: %port', array('%port' => $port)),
-                        $t('Path: %path', array('%path' => $path))));
-    $requirements['apachesolr'] = array(
-      'title' => $t('Apache Solr'),
-      'value' => $value,
-      'description' => $description,
-      'severity' => $severity,
-    );
-    return $requirements;
-  }
-}
-
-/**
  * Like $site_key in _update_refresh() - returns a site-specific hash.
  */
 function apachesolr_site_hash() {
Index: Drupal_Apache_Solr_Service.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/Drupal_Apache_Solr_Service.php,v
retrieving revision 1.1.2.21
diff -u -p -r1.1.2.21 Drupal_Apache_Solr_Service.php
--- Drupal_Apache_Solr_Service.php	14 Oct 2009 19:08:19 -0000	1.1.2.21
+++ Drupal_Apache_Solr_Service.php	15 Nov 2009 06:49:58 -0000
@@ -288,23 +288,4 @@ class Drupal_Apache_Solr_Service extends
     }
     return array($result->data, $headers);
   }
-
-  /**
-   * Create and post a delete document based on multiple document IDs.
-   *
-   * @param array $ids Expected to be utf-8 encoded strings
-   * @return Apache_Solr_Response
-   *
-   * @throws Exception If an error occurs during the service call
-   */
-  public function deleteMultipleById($ids) {
-    $rawPost = "<delete>\n";
-    foreach ($ids as $id) {
-      // Escape special xml characters
-      $id = htmlspecialchars($id, ENT_NOQUOTES, 'UTF-8');
-      $rawPost .= '<id>' . $id . "</id>\n";
-    }
-    $rawPost .= '</delete>';
-    return $this->delete($rawPost);
-  }
 }
Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/README.txt,v
retrieving revision 1.1.2.1.2.30
diff -u -p -r1.1.2.1.2.30 README.txt
--- README.txt	14 Oct 2009 19:08:19 -0000	1.1.2.1.2.30
+++ README.txt	15 Nov 2009 06:49:58 -0000
@@ -32,18 +32,24 @@ Get the PHP library from the external pr
 found at:  http://code.google.com/p/solr-php-client/
 From the apachesolr module directory, run this command:
 
-svn checkout -r6 http://solr-php-client.googlecode.com/svn/trunk/ SolrPhpClient
+svn checkout -r22 http://solr-php-client.googlecode.com/svn/trunk/ SolrPhpClient
 
-Note that revision 6 is the currently tested and suggested revision. 
+Alternately you may download and extract the library from
+http://code.google.com/p/solr-php-client/downloads/list
+
+Make sure to select a r22 archive, either of these two:
+http://solr-php-client.googlecode.com/files/SolrPhpClient.r22.2009-11-09.zip
+http://solr-php-client.googlecode.com/files/SolrPhpClient.r22.2009-11-09.tgz
+
+Note that revision 22 is the currently tested and required revision. 
 Make sure that the final directory is named SolrPhpClient under the apachesolr
-module directory.  Note: the 2009-03-11 version of the library from the 
-googlecode page is r5 and will not work with beta6+.
+module directory.  
 
 If you are maintaing your code base in subversion, you may choose instead to 
 use svn export or svn externals. For an export (writing a copy to your local
 directory without .svn files to track changes) use:
 
-svn export -r6 http://solr-php-client.googlecode.com/svn/trunk/ SolrPhpClient
+svn export -r22 http://solr-php-client.googlecode.com/svn/trunk/ SolrPhpClient
 
 Instead of checking out, externals can be used too. Externals can be seen as 
 (remote) symlinks in svn. This requires your own project in your own svn ]
@@ -53,7 +59,7 @@ svn propedit svn:externals .
 
 Your editor will open. Add a line
 
-SolrPhpClient -r6 http://solr-php-client.googlecode.com/svn/trunk/
+SolrPhpClient -r22 http://solr-php-client.googlecode.com/svn/trunk/
 
 On exports and checkouts, svn will grab the externals, but it will keep the 
 references on the remote server.
