From 70d1421f1ccf68c35a22bb91a2e1e8d088f524e5 Mon Sep 17 00:00:00 2001
From: Rodolphe Quiedeville <rodolphe@quiedeville.org>
Date: Sat, 30 Jul 2005 09:32:35 +0000
Subject: [PATCH] Correction mauvaise gestion du DELETE

---
 htdocs/compta/facture/fiche-rec.php | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index 95e6f414b11..857cb6b7eba 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -74,14 +74,13 @@ if ($_POST["action"] == 'add')
 }
 
 // Suppression
-if ($_POST["action"] == 'delete' && $user->rights->facture->supprimer) 
+if ($_REQUEST["action"] == 'delete' && $user->rights->facture->supprimer) 
 {
-    $fac = new FactureRec($db);
-    $fac->delete($facid);
-    $facid = 0 ;
+  $fac = new FactureRec($db);
+  $fac->delete($_REQUEST["facid"]);
+  $facid = 0 ;
 }
 
-
 /*
  *
  */
-- 
GitLab