Patch #491186 by Damien Tournoud: do not execute mollom checks if the form_id doesn't match.

From: damz <damz@damz-dev.local>


---
 mollom.module |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git mollom.module mollom.module
index 3c07002..e5cde16 100644
--- mollom.module
+++ mollom.module
@@ -842,7 +842,9 @@ function mollom_expand_element($element, $edit, &$form_state, $form) {
     );
   }
 
-  if (!empty($form['#post'])) {
+  // If this form can be submitted by drupal_process_form(), we process it
+  // through our validation handlers.
+  if (!empty($form['#programmed']) || (!empty($form['#post']) && (isset($form['#post']['form_id']) && ($form['#post']['form_id'] == $form_id)))) {
     _mollom_debug("mollom_expand_element: submitted handler");
 
     // First, perform captcha validation if required.
