From bfb5c42124db39605c64f08837eb667be04979cc Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 26 Jan 2009 16:12:57 +0000 Subject: Adding Recaptcha to the comment module. Recaptcha integration consists of a Form_Recaptcha class derived from Form_Input that can be added to any class that requires Recaptcha verfication. --- modules/recaptcha/controllers/admin_recaptcha.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/recaptcha/controllers') diff --git a/modules/recaptcha/controllers/admin_recaptcha.php b/modules/recaptcha/controllers/admin_recaptcha.php index 10938187..23fd8ad3 100644 --- a/modules/recaptcha/controllers/admin_recaptcha.php +++ b/modules/recaptcha/controllers/admin_recaptcha.php @@ -26,7 +26,10 @@ class Admin_Recaptcha_Controller extends Admin_Controller { $valid_key = $form->validate(); if ($valid_key) { - $valid_key = recaptcha::is_recaptcha_valid($form, + $input = Input::instance(); + $challenge = $input->post("recaptcha_challenge_field", "", true); + $response = $input->post("recaptcha_response_field", "", true); + $valid_key = recaptcha::is_recaptcha_valid($challenge, $response, $form->configure_recaptcha->private_key->value); if (empty($valid_key) && $form->captcha_error == "invalid-site-private-key") { $form->configure_recaptcha->private_key->add_error("invalid", 1); -- cgit v1.2.3