From f5451d9c1d8bcf9d8d15327c4576b26414cfad6f Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Fri, 7 Apr 2006 20:57:57 +0000
Subject: [PATCH] Fix: Fonctionne en mode register_globals = off

---
 htdocs/product/fiche.php | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php
index 39f7e7a900e..6d548d182f1 100644
--- a/htdocs/product/fiche.php
+++ b/htdocs/product/fiche.php
@@ -208,22 +208,22 @@ if ($_GET["action"] == 'clone' && $user->rights->produit->creer)
  */
 if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user->rights->produit->supprimer)
 {
-  $product = new Product($db);
-  $product->fetch($id);
-  $result = $product->delete($id);
- 
-  if ($result == 0)
-    {
-      llxHeader();
-      print '<div class="ok">'.$langs->trans("ProductDeleted",$product->ref).'</div>';
-      llxFooter();
-      exit ;
-    }
-  else
-    {
-      $reload = 0;
-      $_GET["action"]='';
-    }
+	$product = new Product($db);
+	$product->fetch($_GET["id"]);
+	$result = $product->delete($_GET["id"]);
+	
+	if ($result == 0)
+	{
+		llxHeader();
+		print '<div class="ok">'.$langs->trans("ProductDeleted",$product->ref).'</div>';
+		llxFooter();
+		exit ;
+	}
+	else
+	{
+		$reload = 0;
+		$_GET["action"]='';
+	}
 }
 
 
-- 
GitLab