diff options
author | Craig Andrews <candrews@integralblue.com> | 2010-10-27 00:11:55 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2010-10-27 00:11:55 -0400 |
commit | 255ba42ef120a3ee0ac21c0c639730d8317b7e79 (patch) | |
tree | e3488c27905c94c2d5097635712dc5e23431bfd9 /plugins | |
parent | 9f9126e5245173b06719638e434b19f6973661b4 (diff) |
use library function to determine if https should be used for recaptcha
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Recaptcha/RecaptchaPlugin.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/Recaptcha/RecaptchaPlugin.php b/plugins/Recaptcha/RecaptchaPlugin.php index 08557cbd8..5a33e7132 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 +} |