diff -ur recaptcha-6.x-1.5-upstream/recaptcha/recaptchalib.php recaptcha-6.x-1.5-fix-urls/recaptcha/recaptchalib.php --- recaptcha-6.x-1.5-upstream/recaptcha/recaptchalib.php 2011-05-03 11:07:01.476665798 +0300 +++ recaptcha-6.x-1.5-fix-urls/recaptcha/recaptchalib.php 2011-05-03 11:27:31.220405280 +0300 @@ -4,7 +4,7 @@ * - Documentation and latest version * http://recaptcha.net/plugins/php/ * - Get a reCAPTCHA API Key - * http://recaptcha.net/api/getkey + * https://www.google.com/recaptcha/admin/create * - Discussion group * http://groups.google.com/group/recaptcha * @@ -35,9 +35,9 @@ /** * The reCAPTCHA server URL's */ -define("RECAPTCHA_API_SERVER", "http://api.recaptcha.net"); -define("RECAPTCHA_API_SECURE_SERVER", "https://api-secure.recaptcha.net"); -define("RECAPTCHA_VERIFY_SERVER", "api-verify.recaptcha.net"); +define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api"); +define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api"); +define("RECAPTCHA_VERIFY_SERVER", "www.google.com"); /** * Encodes the given data into a query string format @@ -106,7 +106,7 @@ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) { if ($pubkey == null || $pubkey == '') { - die ("To use reCAPTCHA you must get an API key from http://recaptcha.net/api/getkey"); + die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); } if ($use_ssl) { @@ -152,7 +152,7 @@ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) { if ($privkey == null || $privkey == '') { - die ("To use reCAPTCHA you must get an API key from http://recaptcha.net/api/getkey"); + die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); } if ($remoteip == null || $remoteip == '') { @@ -169,7 +169,7 @@ return $recaptcha_response; } - $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/verify", + $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", array ( 'privatekey' => $privkey, 'remoteip' => $remoteip, @@ -200,7 +200,7 @@ * @param string $appname The name of your application */ function recaptcha_get_signup_url ($domain = null, $appname = null) { - return "http://recaptcha.net/api/getkey?" . _recaptcha_qsencode (array ('domain' => $domain, 'app' => $appname)); + return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname)); } function _recaptcha_aes_pad($val) { @@ -230,14 +230,14 @@ function recaptcha_mailhide_url($pubkey, $privkey, $email) { if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . - "you can do so at http://mailhide.recaptcha.net/apikey"); + "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); } $ky = pack('H*', $privkey); $cryptmail = _recaptcha_aes_encrypt ($email, $ky); - return "http://mailhide.recaptcha.net/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); + return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); } /** @@ -262,7 +262,7 @@ * Gets html to display an email address given a public an private key. * to get a key, go to: * - * http://mailhide.recaptcha.net/apikey + * http://www.google.com/recaptcha/mailhide/apikey */ function recaptcha_mailhide_html($pubkey, $privkey, $email) { $emailparts = _recaptcha_mailhide_email_parts ($email); @@ -272,3 +272,6 @@ "' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...@" . htmlentities ($emailparts [1]); } + + +?> diff -ur recaptcha-6.x-1.5-upstream/recaptcha_mailhide.module recaptcha-6.x-1.5-fix-urls/recaptcha_mailhide.module --- recaptcha-6.x-1.5-upstream/recaptcha_mailhide.module 2011-05-03 11:07:01.480654931 +0300 +++ recaptcha-6.x-1.5-fix-urls/recaptcha_mailhide.module 2011-05-03 11:27:31.224405150 +0300 @@ -50,14 +50,14 @@ '#title' => t('Public Key'), '#default_value' => variable_get('recaptcha_mailhide_public_key', ''), '#maxlength' => 50, - '#description' => t('Your public Mailhide key obtained from reCAPTCHA.', array('@url' => 'http://mailhide.recaptcha.net/apikey')), + '#description' => t('Your public Mailhide key obtained from reCAPTCHA.', array('@url' => 'http://www.google.com/recaptcha/mailhide/apikey')), ); $form['filter_recaptcha']['recaptcha_mailhide_private_key'] = array( '#type' => 'textfield', '#title' => t('Private Key'), '#default_value' => variable_get('recaptcha_mailhide_private_key', ''), '#maxlength' => 50, - '#description' => t('Your private Mailhide key obtained from reCAPTCHA.', array('@url' => 'http://mailhide.recaptcha.net/apikey')), + '#description' => t('Your private Mailhide key obtained from reCAPTCHA.', array('@url' => 'http://www.google.com/recaptcha/mailhide/apikey')), ); return $form; break; diff -ur recaptcha-6.x-1.5-upstream/recaptcha.module recaptcha-6.x-1.5-fix-urls/recaptcha.module --- recaptcha-6.x-1.5-upstream/recaptcha.module 2011-05-03 11:07:01.472656683 +0300 +++ recaptcha-6.x-1.5-fix-urls/recaptcha.module 2011-05-03 11:27:31.217666135 +0300 @@ -151,7 +151,7 @@ ); $js = "$(function() { Recaptcha.create('$recaptcha_public_key', 'recaptcha_ajax_api_container', {theme: '$recaptcha_theme'});});"; drupal_add_js($js, 'inline', 'header'); - drupal_set_html_head(''); + drupal_set_html_head(''); } } return $captcha;