Commit c2df3e2f authored by Ad Schellevis's avatar Ad Schellevis Committed by GitHub

Merge pull request #1112 from pv2b/master

Style cleanup (ran make stylefix)
parents 214d92c3 8201c62b
...@@ -603,5 +603,4 @@ class SystemhealthController extends ApiControllerBase ...@@ -603,5 +603,4 @@ class SystemhealthController extends ApiControllerBase
} }
return $intfmap; return $intfmap;
} }
} }
...@@ -65,7 +65,7 @@ class AuthenticationFactory ...@@ -65,7 +65,7 @@ class AuthenticationFactory
{ {
$connectors = array(); $connectors = array();
foreach (glob(__DIR__."/*.php") as $filename) { foreach (glob(__DIR__."/*.php") as $filename) {
$pathParts = explode('/',$filename); $pathParts = explode('/', $filename);
$vendor = $pathParts[count($pathParts)-3]; $vendor = $pathParts[count($pathParts)-3];
$module = $pathParts[count($pathParts)-2]; $module = $pathParts[count($pathParts)-2];
$classname = explode('.php', $pathParts[count($pathParts)-1])[0]; $classname = explode('.php', $pathParts[count($pathParts)-1])[0];
......
...@@ -206,7 +206,7 @@ class LocalTOTP extends Local ...@@ -206,7 +206,7 @@ class LocalTOTP extends Local
$fields["otpLength"]["options"]["6"] = "6"; $fields["otpLength"]["options"]["6"] = "6";
$fields["otpLength"]["options"]["8"] = "8"; $fields["otpLength"]["options"]["8"] = "8";
$fields["otpLength"]["help"] = gettext("Token length to use"); $fields["otpLength"]["help"] = gettext("Token length to use");
$fields["otpLength"]["validate"] = function($value) { $fields["otpLength"]["validate"] = function ($value) {
if (!in_array($value, array(6,8))) { if (!in_array($value, array(6,8))) {
return array(gettext("Only token lengths of 6 or 8 characters are supported")); return array(gettext("Only token lengths of 6 or 8 characters are supported"));
} else { } else {
...@@ -219,7 +219,7 @@ class LocalTOTP extends Local ...@@ -219,7 +219,7 @@ class LocalTOTP extends Local
$fields["timeWindow"]["default"] = null; $fields["timeWindow"]["default"] = null;
$fields["timeWindow"]["help"] = gettext("The time period in which the token will be valid,". $fields["timeWindow"]["help"] = gettext("The time period in which the token will be valid,".
" default is 30 seconds (google authenticator)") ; " default is 30 seconds (google authenticator)") ;
$fields["timeWindow"]["validate"] = function($value) { $fields["timeWindow"]["validate"] = function ($value) {
if (!empty($value) && filter_var($value, FILTER_SANITIZE_NUMBER_INT) != $value) { if (!empty($value) && filter_var($value, FILTER_SANITIZE_NUMBER_INT) != $value) {
return array(gettext("Please enter a valid time window in seconds")); return array(gettext("Please enter a valid time window in seconds"));
} else { } else {
...@@ -232,7 +232,7 @@ class LocalTOTP extends Local ...@@ -232,7 +232,7 @@ class LocalTOTP extends Local
$fields["graceperiod"]["default"] = null; $fields["graceperiod"]["default"] = null;
$fields["graceperiod"]["help"] = gettext("Time in seconds in which this server and the token may differ,". $fields["graceperiod"]["help"] = gettext("Time in seconds in which this server and the token may differ,".
" default is 10 seconds. Set higher for a less secure easier match."); " default is 10 seconds. Set higher for a less secure easier match.");
$fields["graceperiod"]["validate"] = function($value) { $fields["graceperiod"]["validate"] = function ($value) {
if (!empty($value) && filter_var($value, FILTER_SANITIZE_NUMBER_INT) != $value) { if (!empty($value) && filter_var($value, FILTER_SANITIZE_NUMBER_INT) != $value) {
return array(gettext("Please enter a valid grace period in seconds")); return array(gettext("Please enter a valid grace period in seconds"));
} else { } else {
......
...@@ -401,7 +401,7 @@ class Voucher implements IAuthConnector ...@@ -401,7 +401,7 @@ class Voucher implements IAuthConnector
$fields["simplePasswords"]["name"] = gettext("Use simple passwords (less secure)"); $fields["simplePasswords"]["name"] = gettext("Use simple passwords (less secure)");
$fields["simplePasswords"]["type"] = "checkbox"; $fields["simplePasswords"]["type"] = "checkbox";
$fields["simplePasswords"]["help"] = gettext("Use simple (less secure) passwords, which are easier to read") ; $fields["simplePasswords"]["help"] = gettext("Use simple (less secure) passwords, which are easier to read") ;
$fields["simplePasswords"]["validate"] = function($value) { $fields["simplePasswords"]["validate"] = function ($value) {
return array(); return array();
}; };
$fields["usernameLength"] = array(); $fields["usernameLength"] = array();
...@@ -409,7 +409,7 @@ class Voucher implements IAuthConnector ...@@ -409,7 +409,7 @@ class Voucher implements IAuthConnector
$fields["usernameLength"]["type"] = "text"; $fields["usernameLength"]["type"] = "text";
$fields["usernameLength"]["default"] = null; $fields["usernameLength"]["default"] = null;
$fields["usernameLength"]["help"] = gettext("Specify alternative username length for generating vouchers"); $fields["usernameLength"]["help"] = gettext("Specify alternative username length for generating vouchers");
$fields["usernameLength"]["validate"] = function($value) { $fields["usernameLength"]["validate"] = function ($value) {
if (!empty($value) && filter_var($value, FILTER_SANITIZE_NUMBER_INT) != $value) { if (!empty($value) && filter_var($value, FILTER_SANITIZE_NUMBER_INT) != $value) {
return array(gettext("Username length must be a number or empty for default.")); return array(gettext("Username length must be a number or empty for default."));
} else { } else {
...@@ -421,7 +421,7 @@ class Voucher implements IAuthConnector ...@@ -421,7 +421,7 @@ class Voucher implements IAuthConnector
$fields["passwordLength"]["type"] = "text"; $fields["passwordLength"]["type"] = "text";
$fields["passwordLength"]["default"] = null; $fields["passwordLength"]["default"] = null;
$fields["passwordLength"]["help"] = gettext("Specify alternative password length for generating vouchers"); $fields["passwordLength"]["help"] = gettext("Specify alternative password length for generating vouchers");
$fields["passwordLength"]["validate"] = function($value) { $fields["passwordLength"]["validate"] = function ($value) {
if (!empty($value) && filter_var($value, FILTER_SANITIZE_NUMBER_INT) != $value) { if (!empty($value) && filter_var($value, FILTER_SANITIZE_NUMBER_INT) != $value) {
return array(gettext("Password length must be a number or empty for default.")); return array(gettext("Password length must be a number or empty for default."));
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment