1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-01 19:52:20 +01:00

Refactor.

- make it easier to follow what is happenining in queue().
This commit is contained in:
Jean Paul Galea 2015-07-15 17:01:51 +02:00
parent 91e49cefd4
commit dfdc4610d6

View File

@ -133,22 +133,27 @@ class SyncLib
public function queue($otpParams, $localParams)
{
$info = $this->createInfoString($otpParams, $localParams);
$this->otpParams = $otpParams;
$this->localParams = $localParams;
$queued=time();
$res=True;
foreach ($this->syncServers as $server) {
if(! $this->db->save('queue', array('queued'=>$queued,
foreach ($this->syncServers as $server) {
$arr = array(
'queued' => $queued,
'modified' => $otpParams['modified'],
'otp' => $otpParams['otp'],
'server' => $server,
'server_nonce' => $this->server_nonce,
'info'=>$info))) $res=False;
'info' => $info
);
if (! $this->db->save('queue', $arr))
$res=False;
}
return $res;
}