mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 10:52:18 +01:00
Refactor.
- make it easier to follow what is happenining in queue().
This commit is contained in:
parent
91e49cefd4
commit
dfdc4610d6
@ -133,22 +133,27 @@ class SyncLib
|
|||||||
|
|
||||||
public function queue($otpParams, $localParams)
|
public function queue($otpParams, $localParams)
|
||||||
{
|
{
|
||||||
|
$info = $this->createInfoString($otpParams, $localParams);
|
||||||
$info=$this->createInfoString($otpParams, $localParams);
|
|
||||||
$this->otpParams = $otpParams;
|
$this->otpParams = $otpParams;
|
||||||
$this->localParams = $localParams;
|
$this->localParams = $localParams;
|
||||||
|
|
||||||
$queued=time();
|
$queued=time();
|
||||||
$res=True;
|
$res=True;
|
||||||
foreach ($this->syncServers as $server) {
|
|
||||||
|
|
||||||
if(! $this->db->save('queue', array('queued'=>$queued,
|
foreach ($this->syncServers as $server) {
|
||||||
'modified'=>$otpParams['modified'],
|
$arr = array(
|
||||||
'otp'=>$otpParams['otp'],
|
'queued' => $queued,
|
||||||
'server'=>$server,
|
'modified' => $otpParams['modified'],
|
||||||
'server_nonce'=>$this->server_nonce,
|
'otp' => $otpParams['otp'],
|
||||||
'info'=>$info))) $res=False;
|
'server' => $server,
|
||||||
|
'server_nonce' => $this->server_nonce,
|
||||||
|
'info' => $info
|
||||||
|
);
|
||||||
|
|
||||||
|
if (! $this->db->save('queue', $arr))
|
||||||
|
$res=False;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user