Skip to content

Commit

Permalink
Fix #38; minor CS fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsoares committed Jun 26, 2021
1 parent 908027d commit b769f7f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions rcguard.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ private function _deprecated_config_var_api()
$url = $config->get('recaptcha_api_secure', false);
if ($url && ($config->get('recaptcha_https', true) || rcube_utils::https_check())) {
$this->rc->config->set('recaptcha_api_url', $url);
}
else {
} else {
$url = $config->get('recaptcha_api', false);
if ($url) {
$this->rc->config->set('recaptcha_api_url', $url);
Expand All @@ -260,11 +259,9 @@ private function show_recaptcha($loginform)

if ($api_version === 'v3') {
$loginform['content'] .= $this->show_recaptcha_v3();
}
else if ($api_version === 'v2invisible') {
} elseif ($api_version === 'v2invisible') {
$loginform['content'] .= $this->show_recaptcha_v2invisible();
}
else {
} else {
$html = $this->show_recaptcha_v2();

$skin_path = $this->local_skin_path();
Expand Down Expand Up @@ -424,7 +421,7 @@ private function cidr_match($ip, $cidr)
$cidr .= '/32';
}

[$subnet, $bits] = explode('/', $cidr);
list($subnet, $bits) = explode('/', $cidr);
$ip = ip2long($ip);
$subnet = ip2long($subnet);
$mask = -1 << (32 - $bits);
Expand Down

0 comments on commit b769f7f

Please sign in to comment.