From 255ba42ef120a3ee0ac21c0c639730d8317b7e79 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 27 Oct 2010 00:11:55 -0400 Subject: [PATCH] use library function to determine if https should be used for recaptcha --- plugins/Recaptcha/RecaptchaPlugin.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/plugins/Recaptcha/RecaptchaPlugin.php b/plugins/Recaptcha/RecaptchaPlugin.php index 08557cbd84..5a33e7132e 100644 --- a/plugins/Recaptcha/RecaptchaPlugin.php +++ b/plugins/Recaptcha/RecaptchaPlugin.php @@ -51,15 +51,6 @@ class RecaptchaPlugin extends Plugin } } - function checkssl() - { - if(common_config('site', 'ssl') === 'sometimes' || common_config('site', 'ssl') === 'always') { - return true; - } - return false; - } - - function onEndRegistrationFormData($action) { $action->elementStart('li'); @@ -79,7 +70,7 @@ class RecaptchaPlugin extends Plugin { if (isset($action->recaptchaPluginNeedsOutput) && $action->recaptchaPluginNeedsOutput) { // Load the AJAX API - if ($this->checkssl()) { + if (StatusNet::isHTTPS()) { $url = "https://api-secure.recaptcha.net/js/recaptcha_ajax.js"; } else { $url = "http://api.recaptcha.net/js/recaptcha_ajax.js"; @@ -120,4 +111,4 @@ class RecaptchaPlugin extends Plugin 'captcha to the registration page.')); return true; } -} \ No newline at end of file +}