From: Craig Andrews Date: Wed, 27 Oct 2010 04:11:55 +0000 (-0400) Subject: use library function to determine if https should be used for recaptcha X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=255ba42ef120a3ee0ac21c0c639730d8317b7e79;p=quix0rs-gnu-social.git use library function to determine if https should be used for recaptcha --- 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 +}