mirror of https://github.com/BOINC/boinc.git
web: try to get Recaptcha working on IE
This commit is contained in:
parent
cba89c6503
commit
c2350c7f57
|
@ -19,6 +19,7 @@
|
|||
// forms for account creation and login
|
||||
|
||||
function create_account_form($teamid, $next_url) {
|
||||
global $recaptcha_public_key;
|
||||
echo "
|
||||
<form action=\"create_account_action.php\" method=\"post\">
|
||||
<input type=hidden name=next_url value=\"$next_url\">
|
||||
|
@ -75,13 +76,12 @@ function create_account_form($teamid, $next_url) {
|
|||
);
|
||||
}
|
||||
|
||||
// Check if we're reCaptcha to prevent spam accounts
|
||||
// Check if we're using reCaptcha to prevent spam accounts
|
||||
//
|
||||
$publickey = parse_config(get_config(), "<recaptcha_public_key>");
|
||||
if ($publickey) {
|
||||
if ($recaptcha_public_key) {
|
||||
row2(
|
||||
"",
|
||||
boinc_recaptcha_get_html($publickey)
|
||||
boinc_recaptcha_get_html($recaptcha_public_key)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,16 +22,15 @@
|
|||
require('../inc/recaptcha_loader.php');
|
||||
|
||||
function boinc_recaptcha_get_head_extra() {
|
||||
// are we using recaptcha?
|
||||
$publickey = parse_config(get_config(), "<recaptcha_public_key>");
|
||||
if ($publickey) {
|
||||
global $recaptcha_public_key;
|
||||
if ($recaptcha_public_key) {
|
||||
// the meta tag must be included
|
||||
// for Recaptcha to work with some IE browsers
|
||||
return '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>';
|
||||
} else {
|
||||
return null;
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
';
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function boinc_recaptcha_get_html($publickey) {
|
||||
|
@ -56,4 +55,4 @@ function boinc_recaptcha_isValidated($privatekey) {
|
|||
return true;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -31,7 +31,13 @@ require_once("../inc/translation.inc");
|
|||
require_once("../inc/profile.inc");
|
||||
require_once("../inc/bootstrap.inc");
|
||||
|
||||
$master_url = parse_config(get_config(), "<master_url>");
|
||||
// parse some stuff from config (do it here for efficiency)
|
||||
//
|
||||
$config = get_config();
|
||||
$master_url = parse_config($config , "<master_url>");
|
||||
$no_computing = parse_bool($config, "no_computing");
|
||||
$recaptcha_public_key = parse_config($config, "<recaptcha_public_key>");
|
||||
$recaptcha_private_key = parse_config($config, "<recaptcha_private_key>");
|
||||
|
||||
// don't allow /... at the end of URL
|
||||
|
||||
|
@ -533,7 +539,8 @@ function check_tokens($auth) {
|
|||
}
|
||||
|
||||
function no_computing() {
|
||||
return parse_bool(get_config(), "no_computing");
|
||||
global $no_computing;
|
||||
return $no_computing;
|
||||
}
|
||||
|
||||
// Generates a legal filename from a parameter string.
|
||||
|
|
Loading…
Reference in New Issue