mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 01:52:18 +01:00
Refactor.
This commit is contained in:
parent
3572410b30
commit
ca5e787452
@ -53,16 +53,25 @@ function logdie ($logger, $str)
|
||||
die($str . "\n");
|
||||
}
|
||||
|
||||
function getHttpVal($key, $defaultVal) {
|
||||
$val = $defaultVal;
|
||||
if (array_key_exists($key, $_GET)) {
|
||||
function getHttpVal ($key, $default)
|
||||
{
|
||||
if (array_key_exists($key, $_GET))
|
||||
{
|
||||
$val = $_GET[$key];
|
||||
} else if (array_key_exists($key, $_POST)) {
|
||||
}
|
||||
elseif (array_key_exists($key, $_POST))
|
||||
{
|
||||
$val = $_POST[$key];
|
||||
}
|
||||
$v = trim($val);
|
||||
$v = str_replace('\\', "", $v);
|
||||
return $v;
|
||||
else
|
||||
{
|
||||
$val = $default;
|
||||
}
|
||||
|
||||
$val = trim($val);
|
||||
$val = str_replace('\\', '', $val);
|
||||
|
||||
return $val;
|
||||
}
|
||||
|
||||
function log_format() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user