Commit 90be2156 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Gestion des ID à 0 pour les HISTO USERS

parent a7947b7c
Loading
Loading
Loading
Loading
Loading
+6 −6
Changes for src/Table.php: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -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);