mirror of
https://github.com/Yubico/yubikey-val.git
synced 2024-11-29 00:24:13 +01:00
Re-indent everything according to PEAR standard
This commit is contained in:
parent
d0e4db3245
commit
2c133de5f3
@ -117,7 +117,7 @@ class DbImpl extends Db
|
||||
}
|
||||
|
||||
/**
|
||||
* function to close the cursor after having fetched rows
|
||||
* Function to close the cursor after having fetched rows
|
||||
*
|
||||
* @param object $result Query result object or null to use the current one
|
||||
*
|
||||
|
@ -36,8 +36,6 @@ require_once('ykval-db.php');
|
||||
|
||||
class DbImpl extends Db
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -99,7 +97,6 @@ class DbImpl extends Db
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function to get a row from the query result
|
||||
* Once all rows have been fetch, function closeCursor needs to be called
|
||||
|
@ -150,7 +150,6 @@ abstract class Db
|
||||
return $this->query($query, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function to update row in database
|
||||
*
|
||||
@ -209,7 +208,6 @@ abstract class Db
|
||||
return $this->query($query, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function to update row in database based on a condition.
|
||||
* An ID value is passed to select the appropriate column
|
||||
@ -272,7 +270,7 @@ abstract class Db
|
||||
* @param string $table Database table to update row in
|
||||
* @param int $nr Number of rows to collect. NULL=>inifinity. DEFAULT=1.
|
||||
* @return mixed Array with values from Db row or 2d-array with multiple rows
|
||||
or false on failure.
|
||||
or false on failure.
|
||||
*
|
||||
*/
|
||||
public function last($table, $nr=1)
|
||||
|
@ -46,7 +46,7 @@ $db = Db::GetDatabaseHandle($baseParams, $logname);
|
||||
if (!$db->connect()) {
|
||||
$myLog->log(LOG_WARNING, "Could not connect to database");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
$result=$db->customQuery("SELECT active, created, modified, yk_publicname, yk_counter, yk_use, yk_low, yk_high, nonce, notes FROM yubikeys ORDER BY yk_publicname");
|
||||
while($row = $db->fetchArray($result)){
|
||||
@ -61,7 +61,7 @@ while($row = $db->fetchArray($result)){
|
||||
"," . $row['nonce'] .
|
||||
"," . $row['notes'] .
|
||||
"\n";
|
||||
}
|
||||
}
|
||||
|
||||
$db->closeCursor($result);
|
||||
$db->disconnect();
|
||||
|
@ -46,7 +46,7 @@ $db = Db::GetDatabaseHandle($baseParams, $logname);
|
||||
if (!$db->connect()) {
|
||||
$myLog->log(LOG_WARNING, "Could not connect to database");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $db->customQuery("select id, active, created, secret, email, notes, otp from clients order by id");
|
||||
while($row = $db->fetchArray($result)) {
|
||||
|
@ -47,7 +47,7 @@ if (!$db->connect()) {
|
||||
$myLog->log(LOG_WARNING, "Could not connect to database");
|
||||
error_log("Could not connect to database");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
while ($res=fgetcsv(STDIN, 0, ",")) {
|
||||
@ -83,7 +83,7 @@ while ($res=fgetcsv(STDIN, 0, ",")) {
|
||||
}
|
||||
}
|
||||
$db->closeCursor($result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$myLog->log(LOG_NOTICE, "Successfully imported clients to database");
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
# Copyright (c) 2010-2015 Yubico AB
|
||||
# All rights reserved.
|
||||
#
|
||||
|
@ -38,7 +38,6 @@ require_once 'ykval-config.php';
|
||||
require_once 'ykval-common.php';
|
||||
require_once 'ykval-synclib.php';
|
||||
|
||||
|
||||
$urls = $baseParams['__YKVAL_SYNC_POOL__'];
|
||||
|
||||
if ($argc == 2 && strcmp($argv[1], 'autoconf') == 0)
|
||||
|
@ -37,7 +37,6 @@ set_include_path(implode(PATH_SEPARATOR, array(
|
||||
require_once 'ykval-config.php';
|
||||
require_once 'ykval-common.php';
|
||||
|
||||
|
||||
$urls = $baseParams['__YKVAL_SYNC_POOL__'];
|
||||
|
||||
if ($argc == 2 && strcmp($argv[1], 'autoconf') == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user