? f.p
? modules
? testing-mode.patch
Index: mollom.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.admin.inc,v
retrieving revision 1.24
diff -u -r1.24 mollom.admin.inc
--- mollom.admin.inc	26 May 2010 20:15:18 -0000	1.24
+++ mollom.admin.inc	26 May 2010 20:59:42 -0000
@@ -531,8 +531,15 @@
     '#description' => t('Displays a link to the recommended <a href="@privacy-policy-url">privacy policy on mollom.com</a> on all forms that are protected via <a href="@help-url">textual analysis</a>. When disabling this option, you are required to inform visitors about data privacy through other means, as stated in the <a href="@terms-of-service-url">terms of service</a> applying to your subscription.', array(
       '@privacy-policy-url' => 'http://mollom.com/web-service-privacy-policy',
       '@help-url' => url('admin/help/mollom'),
-      '@terms-of-service-url' => 'http://mollom.com/terms-of-service',
-    )),
+      '@terms-of-service-url' => 'http://mollom.com/terms-of-service')),
+  );
+        
+  $form['mollom_testing_mode'] = array(
+    '#type' => 'checkbox',
+    '#title' => t("Activate testing mode"),
+    '#return_value' => 1,
+    '#default_value' => variable_get('mollom_testing_mode', 0),
+    '#description' => t("Allows Mollom to be tested. When in developer mode, you can type 'ham', 'unsure' or 'spam' in the post body of a Mollom protected form to trigger the corresponding Mollom behavior. When enabling this option, Mollom stops working correctly so it should never be used in production environments."),
   );
 
   return system_settings_form($form);
Index: mollom.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.module,v
retrieving revision 1.45
diff -u -r1.45 mollom.module
--- mollom.module	26 May 2010 20:15:18 -0000	1.45
+++ mollom.module	26 May 2010 20:59:43 -0000
@@ -1338,6 +1338,11 @@
   // Retrieve the list of Mollom servers from the database.
   $servers = variable_get('mollom_servers', array());
 
+  // Enable testing mode.
+  if ($developer = variable_get('mollom_testing_mode', 0)) {
+    $data['testing'] = TRUE;
+  }
+  
   if (empty($servers)) {
     // Retrieve a new list of servers.
     $servers = _mollom_retrieve_server_list();
