From 9030cb9ddefbf9deafa6b0a1819ef63ec123608c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jun 2004 11:36:50 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20La=20fonction=20rollback=20etait=20appel?= =?UTF-8?q?=E9e=20sur=20l'objet=20paiement=20au=20lieu=20de=20l'objet=20db?= =?UTF-8?q?=20de=20l'objet=20paiement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/paiement.class.php | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index bdfb5904570..3db6fc987d2 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -139,20 +139,19 @@ class Paiement { $sql_err++; } - - - if ( $sql_err == 0 ) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->rollback(); - return -1; - } - } + + if ( $total > 0 && $sql_err == 0 ) + { + $this->db->commit(); + return $this->id; + } + else + { + $this->db->rollback(); + return -1; + } + } } /*