Minor, fix an issue where recaptcha is included over HTTP on HTTPS installs and blocked by Chrome.

This commit is contained in:
epriestley
2012-08-27 14:22:04 -07:00
parent a44de4f76c
commit c4efeb3c97

View File

@@ -65,10 +65,14 @@ final class AphrontFormRecaptchaControl extends AphrontFormControl {
protected function renderInput() {
self::requireLib();
$uri = new PhutilURI(PhabricatorEnv::getEnvConfig('phabricator.base-uri'));
$protocol = $uri->getProtocol();
$use_ssl = ($protocol == 'https');
return recaptcha_get_html(
PhabricatorEnv::getEnvConfig('recaptcha.public-key'),
$error = null,
$use_ssl = false);
$use_ssl);
}
}