Skip to content
Snippets Groups Projects
Commit 90be2156 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Gestion des ID à 0 pour les HISTO USERS

parent a7947b7c
No related branches found
No related tags found
No related merge requests found
Pipeline #32043 passed
......@@ -316,8 +316,8 @@ class Table
$data[$idCol] = $this->lastInsertId;
}
$histoUserId = (int)$bdd->getHistoUserId();
if ($histoUserId && $this->hasHistorique()) {
$histoUserId = $bdd->getHistoUserId();
if ($histoUserId !== null && $this->hasHistorique()) {
$histoCreationCol = $this->getBdd()->getOption(Bdd::OPTION_HISTO_CREATION_COLUMN);
$histoCreateurIdCol = $this->getBdd()->getOption(Bdd::OPTION_HISTO_CREATEUR_ID_COLUMN);
$histoModificationCol = $this->getBdd()->getOption(Bdd::OPTION_HISTO_MODIFICATION_COLUMN);
......@@ -367,8 +367,8 @@ class Table
$params = [];
$histoUserId = (int)$bdd->getHistoUserId();
if ($histoUserId && $this->hasHistorique()) {
$histoUserId = $bdd->getHistoUserId();
if ($histoUserId !== null && $this->hasHistorique()) {
$histoModificationCol = $this->getBdd()->getOption(Bdd::OPTION_HISTO_MODIFICATION_COLUMN);
$histoModificateurIdCol = $this->getBdd()->getOption(Bdd::OPTION_HISTO_MODIFICATEUR_ID_COLUMN);
......@@ -445,7 +445,7 @@ class Table
$ddl = $this->getDdl();
$bdd = $this->getBdd();
$histoUserId = (int)$bdd->getHistoUserId();
$histoUserId = $bdd->getHistoUserId();
$hasHistorique = $this->hasHistorique();
$idCol = $this->getBdd()->getOption(Bdd::OPTION_ID_COLUMN);
......@@ -491,7 +491,7 @@ class Table
$n = null;
}
if (empty($n) && $options['soft-delete'] && $hasHistorique && $histoUserId) { // SOFT DELETE
if (empty($n) && $options['soft-delete'] && $hasHistorique && $histoUserId !== null) { // SOFT DELETE
$histoDestructionCol = $this->getBdd()->getOption(Bdd::OPTION_HISTO_DESTRUCTION_COLUMN);
$histoDestructeurIdCol = $this->getBdd()->getOption(Bdd::OPTION_HISTO_DESTRUCTEUR_ID_COLUMN);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment