--- captcha.module.orig 2007-01-30 14:44:46.000000000 -0500 +++ captcha.module 2007-03-10 16:44:27.000000000 -0500 @@ -129,19 +129,20 @@ function captcha_form_alter($form_id, &$ } if ($flag && isset($trigger)) { $form['#submit'] = array('captcha_submit' => array()) + $form['#submit']; - if (!_captcha_validate($_POST['captcha_response'])) { - if (module_hook($captcha_type, 'captchachallenge')) { - call_user_func_array($captcha_type .'_captchachallenge', array(&$form, &$_SESSION['captcha'])); - if(variable_get('captcha_override_module_description', 0)) { - unset($form['captcha_response']['#description']); + if (isset($_POST['captcha_response'])) { + _captcha_validate($_POST['captcha_response']); + } + if (module_hook($captcha_type, 'captchachallenge')) { + call_user_func_array($captcha_type .'_captchachallenge', array(&$form, &$_SESSION['captcha'])); + if(variable_get('captcha_override_module_description', 0)) { + unset($form['captcha_response']['#description']); + } + if (strlen(variable_get('captcha_description', '')) > 0) { + if (isset($form['captcha_response']['#description'])) { + $form['captcha_response']['#description'] .= ' '. variable_get('captcha_description', ''); } - if (strlen(variable_get('captcha_description', '')) > 0) { - if (isset($form['captcha_response']['#description'])) { - $form['captcha_response']['#description'] .= ' '. variable_get('captcha_description', ''); - } - else { - $form['captcha_response']['#description'] = variable_get('captcha_description', ''); - } + else { + $form['captcha_response']['#description'] = variable_get('captcha_description', ''); } } }