mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Missing date creation
This commit is contained in:
parent
07079fc239
commit
d062575204
|
|
@ -137,8 +137,8 @@ class DoliStorage implements TokenStorageInterface
|
|||
if ($obj) {
|
||||
// update
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token";
|
||||
$sql.= " SET token = '".$this->db->escape(dolEncrypt($serializedToken))."'";
|
||||
$sql.= " WHERE rowid = ".((int) $obj['rowid']);
|
||||
$sql .= " SET token = '".$this->db->escape(dolEncrypt($serializedToken))."'";
|
||||
$sql .= " WHERE rowid = ".((int) $obj['rowid']);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
dol_print_error($this->db);
|
||||
|
|
@ -147,7 +147,7 @@ class DoliStorage implements TokenStorageInterface
|
|||
// save
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, token, entity, datec)";
|
||||
$sql .= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape(dolEncrypt($serializedToken))."', ".((int) $conf->entity).", ";
|
||||
$sql .= " '".$this->db->idate(dol_now())."'";
|
||||
$sql .= "'".$this->db->idate(dol_now())."'";
|
||||
$sql .= ")";
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
|
|
@ -299,13 +299,15 @@ class DoliStorage implements TokenStorageInterface
|
|||
if ($obj) {
|
||||
// update
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token";
|
||||
$sql.= " SET state = '".$this->db->escape($newstate)."'";
|
||||
$sql.= " WHERE rowid = ".((int) $obj['rowid']);
|
||||
$sql .= " SET state = '".$this->db->escape($newstate)."'";
|
||||
$sql .= " WHERE rowid = ".((int) $obj['rowid']);
|
||||
$resql = $this->db->query($sql);
|
||||
} else {
|
||||
// insert (should not happen)
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, state, entity)";
|
||||
$sql.= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape($newstate)."', ".((int) $conf->entity).")";
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, state, entity, datec)";
|
||||
$sql .= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape($newstate)."', ".((int) $conf->entity).", ";
|
||||
$sql .= "'".$this->db->idate(dol_now())."'";
|
||||
$sql .= ")";
|
||||
$resql = $this->db->query($sql);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user