]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Regression fix for Recaptcha on SSL registration page; their API is served on a diffe...
authorBrion Vibber <brion@pobox.com>
Thu, 24 Jun 2010 15:21:04 +0000 (15:21 +0000)
committerBrion Vibber <brion@pobox.com>
Thu, 24 Jun 2010 15:21:04 +0000 (15:21 +0000)
plugins/Recaptcha/RecaptchaPlugin.php

index f09d81ec00e546df827fe658f794cc2b99e80409..7cc34c56863dcf1702e036857fbe678a48b30124 100644 (file)
@@ -77,8 +77,11 @@ class RecaptchaPlugin extends Plugin
     {
         if (isset($action->recaptchaPluginNeedsOutput) && $action->recaptchaPluginNeedsOutput) {
             // Load the AJAX API
-            $proto = $this->checkssl() ? 'https' : 'http';
-            $url = "$proto://api.recaptcha.net/js/recaptcha_ajax.js";
+            if ($this->checkssl()) {
+                $url = "https://api-secure.recaptcha.net/js/recaptcha_ajax.js";
+            } else {
+                $url = "http://api.recaptcha.net/js/recaptcha_ajax.js";
+            }
             $action->script($url);
             
             // And when we're ready, fill out the captcha!