Index: mollom.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.module,v
retrieving revision 1.70
diff -u -p -r1.70 mollom.module
--- mollom.module	9 Sep 2010 15:05:03 -0000	1.70
+++ mollom.module	11 Sep 2010 01:55:25 -0000
@@ -755,7 +755,10 @@ function mollom_form_new($form_id = NULL
   $mollom_form = array();
   if (isset($form_id)) {
     $form_list = mollom_form_list();
-    $mollom_form = mollom_form_info($form_id, $form_list[$form_id]['module']);
+    if (isset($form_list[$form_id])) {
+      $mollom_form += $form_list[$form_id];
+    }
+    $mollom_form += mollom_form_info($form_id, $form_list[$form_id]['module']);
   }
   // Ensure default properties are defined.
   $mollom_form += array(
@@ -784,6 +787,10 @@ function mollom_form_load($form_id) {
     $mollom_form['enabled_fields'] = unserialize($mollom_form['enabled_fields']);
 
     // Attach form registry information.
+    $form_list = mollom_form_list();
+    if (isset($form_list[$form_id])) {
+      $mollom_form += $form_list[$form_id];
+    }
     $mollom_form += mollom_form_info($form_id, $mollom_form['module']);
   }
   return $mollom_form;
@@ -1299,7 +1306,6 @@ function mollom_validate_analysis(&$form
           $form_state['mollom']['response']['session_id'] = $captcha['response']['session_id'];
           $form['mollom']['session_id']['#value'] = $captcha['response']['session_id'];
           $form['mollom']['captcha']['#field_prefix'] = $captcha['markup'];
-          $GLOBALS['mollom_response'] = $form_state['mollom']['response'];
         }
         break;
 
@@ -1897,11 +1903,16 @@ function mollom_form_node_multiple_delet
  * Implements hook_mollom_form_list().
  */
 function comment_mollom_form_list() {
-  $forms['comment_form'] = array(
-    'title' => t('Comment form'),
-    'entity' => 'comment',
-    'delete form' => 'comment_confirm_delete',
-  );
+  $forms = array();
+  foreach (node_type_get_types() as $type) {
+    $form_id = "comment_node_{$type->type}_form";
+    $forms[$form_id] = array(
+      'title' => t('@name comment form', array('@name' => $type->name)),
+      'entity' => 'comment',
+      'bundle' => 'comment_node_' . $type->type,
+      'delete form' => 'comment_confirm_delete',
+    );
+  }
   return $forms;
 }
 
@@ -1910,10 +1921,8 @@ function comment_mollom_form_list() {
  */
 function comment_mollom_form_info($form_id) {
   $form_info = array(
-    'title' => t('Comment form'),
     'mode' => MOLLOM_MODE_ANALYSIS,
     'bypass access' => array('administer comments'),
-    'entity' => 'comment',
     'elements' => array(
       'subject' => t('Subject'),
       // @todo Update for Field API.
Index: tests/mollom.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/tests/mollom.test,v
retrieving revision 1.54
diff -u -p -r1.54 mollom.test
--- tests/mollom.test	3 Sep 2010 17:34:07 -0000	1.54
+++ tests/mollom.test	11 Sep 2010 01:52:38 -0000
@@ -994,7 +994,7 @@ class MollomAccessTestCase extends Mollo
    */
   function testBypassAccess() {
     $this->drupalLogin($this->admin_user);
-    $this->setProtection('comment_form');
+    $this->setProtection('comment_node_article_form');
     $this->drupalLogout();
 
     $node = $this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => 'node body'))), 'type' => 'article'));
@@ -1791,7 +1791,7 @@ class MollomCommentFormTestCase extends 
   function testCaptchaProtectedCommentForm() {
     // Enable Mollom CAPTCHA protection for comments.
     $this->drupalLogin($this->admin_user);
-    $this->setProtection('comment_form', MOLLOM_MODE_CAPTCHA);
+    $this->setProtection('comment_node_article_form', MOLLOM_MODE_CAPTCHA);
     $this->drupalLogout();
 
     // Request the comment reply form. There should be a CAPTCHA form.
@@ -1829,7 +1829,7 @@ class MollomCommentFormTestCase extends 
   function testTextAnalysisProtectedCommentForm() {
     // Enable Mollom text-classification for comments.
     $this->drupalLogin($this->admin_user);
-    $this->setProtection('comment_form');
+    $this->setProtection('comment_node_article_form');
     $this->drupalLogout();
 
     // Request the comment reply form.  Initially, there should be no CAPTCHA.
@@ -2204,7 +2204,7 @@ class MollomDataTestCase extends MollomW
    */
   function testAnalysis() {
     $this->drupalLogin($this->admin_user);
-    $this->setProtection('comment_form');
+    $this->setProtection('comment_node_article_form');
 
     // Make comment preview optional.
     $edit = array(
@@ -2391,7 +2391,7 @@ class MollomReportTestCase extends Mollo
    */
   function testReportComment() {
     $this->drupalLogin($this->admin_user);
-    $this->setProtection('comment_form');
+    $this->setProtection('comment_node_article_form');
     $this->drupalLogout();
 
     $this->node = $this->drupalCreateNode(array('type' => 'article'));
@@ -2429,7 +2429,7 @@ class MollomReportTestCase extends Mollo
    */
   function testMassReportComments() {
     $this->drupalLogin($this->admin_user);
-    $this->setProtection('comment_form');
+    $this->setProtection('comment_node_article_form');
     $this->drupalLogout();
 
     $this->node = $this->drupalCreateNode(array('type' => 'article'));
Index: tests/mollom_test.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/tests/mollom_test.module,v
retrieving revision 1.13
diff -u -p -r1.13 mollom_test.module
--- tests/mollom_test.module	10 Aug 2010 19:33:51 -0000	1.13
+++ tests/mollom_test.module	11 Sep 2010 01:53:16 -0000
@@ -13,6 +13,7 @@ function mollom_test_xmlrpc() {
   return array(
     // $data contains a variable amount of properties, so we cannot specify a
     // signature.
+    'mollom.getServerList' => 'mollom_test_get_server_list',
     'mollom.verifyKey' => 'mollom_test_verify_key',
     'mollom.checkContent' => 'mollom_test_check_content',
     'mollom.getImageCaptcha' => 'mollom_test_get_captcha',
@@ -21,6 +22,17 @@ function mollom_test_xmlrpc() {
 }
 
 /**
+ * XML-RPC callback for mollom.getServerList to retrieve new server list.
+ */
+function mollom_test_get_server_list($data) {
+  $storage = variable_get(__FUNCTION__, array());
+  $storage[] = $data;
+  variable_set(__FUNCTION__, $storage);
+
+  return array($GLOBALS['base_url'] . '/xmlrpc.php?version=');
+}
+
+/**
  * XML-RPC callback for mollom.verifyKey to validate API keys.
  */
 function mollom_test_verify_key($data) {
@@ -106,12 +118,8 @@ function mollom_test_check_content($data
   if (isset($data['checks']) && strpos($data['checks'], 'profanity') !== FALSE) {
     $profanity = 0.0;
     foreach (array('post_title', 'post_body') as $key) {
-      if (!isset($data[$key])) {
-        continue;
-      }
-      // @todo Client/server testing value mismatch.
-      if (strpos($data[$key], 'profanity') !== FALSE) {
-        $profanity = 0.8;
+      if (isset($data[$key]) && strpos($data[$key], 'profanity') !== FALSE) {
+        $profanity = 1.0;
       }
     }
     $response['profanity'] = $profanity;
