--- dsax.module	2009-01-06 10:08:33.000000000 +0200
+++ mollom.module	2009-02-08 23:22:59.750000000 +0200
@@ -19,6 +19,7 @@ define('MOLLOM_MODE_ANALYSIS', 2);

 define('MOLLOM_FALLBACK_BLOCK' , 0);
 define('MOLLOM_FALLBACK_ACCEPT', 1);
+define('MOLLOM_FALLBACK_UNPUBLISH', 2);

 define('MOLLOM_ERROR'   , 1000);
 define('MOLLOM_REFRESH' , 1100);
@@ -308,6 +309,14 @@ function mollom_nodeapi($node, $op) {
     $languages = isset($GLOBALS['mollom_response']['languages']) ? implode(' ', $GLOBALS['mollom_response']['languages']) : '';
     mollom_set_data($GLOBALS['mollom_response']['session_id'], $quality, $reputation, $languages, 'node-'. $node->nid);
   }
+	if(variable_get('mollom_unpublish_status', 0))
+	{
+ 	if (!user_access('post with no checking')) {
+			switch($op){
+				case 'presave':
+				$node->status = 0;
+				drupal_set_message("The spam filter installed on this site is currently unavailable. Your submission will be accepted after an administrator reviews it.", 'warning');
+				break;
+			}
+   }
+	}
 }

 /**
@@ -708,6 +717,7 @@ function mollom_admin_settings() {
       '#default_value' => variable_get('mollom_fallback', MOLLOM_FALLBACK_BLOCK), // we default to treating everything as inappropriate
       '#options' => array(
         MOLLOM_FALLBACK_BLOCK => t('Block all submissions of protected forms until the server problems are resolved'),
+				MOLLOM_FALLBACK_UNPUBLISH => t('Leave all forms unprotected and unpublish all submissions'),
         MOLLOM_FALLBACK_ACCEPT => t('Leave all forms unprotected and accept all submissions'),
       ),
       '#description' => t('When the Mollom servers are down or otherwise unreachable, no text analysis is performed and no CAPTCHAs are generated. If this occurs, your Drupal site will use the configured fallback strategy, and will either accept all submissions without spam checking, or block all submissions until the server or connection problems are resolved. Subscribers to <a href="@pricing">Mollom Plus</a> receive access to <a href="@sla">Mollom\'s high-availability backend infrastructure</a>, not available to free users, reducing potential downtime.', array('@pricing' => 'http://mollom.com/pricing', '@sla' => 'http://mollom.com/standard-service-level-agreement')));
@@ -757,12 +767,15 @@ function _mollom_get_openid($account) {
 }

 function _mollom_fallback() {
-  $fallback = variable_get('mollom_fallback', MOLLOM_FALLBACK_BLOCK);
-  if ($fallback == MOLLOM_FALLBACK_BLOCK) {
-    form_set_error('mollom', t("The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes."));
-  }
+  $fallback = variable_get('mollom_fallback', MOLLOM_FALLBACK_BLOCK);
+  if ($fallback == MOLLOM_FALLBACK_BLOCK) {
+    form_set_error('mollom', t("The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes."));
+  }
+	else if($fallback == MOLLOM_FALLBACK_UNPUBLISH) {
+		variable_set('mollom_unpublish_status', 1);
+	}

-  watchdog('mollom', 'All Mollom servers were unavailable: %servers, last error: @errno - %error_msg', array('%servers' => print_r(variable_get('mollom_servers', array()), TRUE), '@errno' => xmlrpc_errno(), '%error_msg' => xmlrpc_error_msg()), WATCHDOG_ERROR);
+	watchdog('mollom', 'All Mollom servers were unavailable: %servers, last error: @errno - %error_msg', array('%servers' => print_r(variable_get('mollom_servers', array()), TRUE), '@errno' => xmlrpc_errno(), '%error_msg' => xmlrpc_error_msg()), WATCHDOG_ERROR);
 }

 /**
@@ -780,7 +793,7 @@ function mollom_elements() {
 }

 /**
- * Expand the mollom element via #process.
+ * Expand the mollom element via #process.
  *
  * @param $element
  *   An associative array containing the properties of the element.
@@ -799,7 +812,7 @@ function mollom_expand_element($element,
   // state of validation of a form. That ID is valid for a specific user session
   // and for a given form_id only. We expire it as soon as the form is
   // submitted, to avoid it being replayed.
-
+
   // The current state can come either from the $form_state, if the form
   // was just rebuilt in the same request...
   if (!empty($form_state['mollom'])) {
@@ -849,7 +862,7 @@ function mollom_expand_element($element,
     // TODO: find a better way to do this in D7.
     $_SERVER['REQUEST_METHOD'] = 'POST';
   }
-
+
   if (!empty($mollom_state['#session_id'])) {
     // We store the Mollom session only if something useful was done.
     // We save it in two places: as an hidden form field and in the cache
@@ -1075,7 +1088,7 @@ function mollom($method, $data = array()

   // Initialize refresh variable:
   $refresh = FALSE;
-
+
   // Retrieve the list of Mollom servers from the database:
   $servers = variable_get('mollom_servers', NULL);

@@ -1124,14 +1137,14 @@ function mollom($method, $data = array()
         }
         elseif ($error->code == MOLLOM_REDIRECT) {
           // If this is a network error, we go to the next server in the list.
-          $next = next($servers);
-
+          $next = next($servers);
+
           // Do nothing, we automatically select the next server.
           watchdog('mollom', 'The Mollom server %server asked to use the next Mollom server in the list: %next.', array('%server' => $server, '%next' => $next));
         }
         else {
           watchdog('mollom', 'Error @errno from %server: %message - %method - <pre>@data</pre>', array('@errno' => $error->code, '%server' => $server, '%message' => $error->message, '%method' => $method, '@data' => print_r($data, TRUE)), WATCHDOG_ERROR);
-
+
           // If it is a 'clean' Mollom error we return instantly.

           if ($error->code == MOLLOM_ERROR) {
@@ -1139,7 +1152,7 @@ function mollom($method, $data = array()
           }

           // If this is a network error, we go to the next server in the list.
-          next($servers);
+          next($servers);
         }
       }
       else {
