Skip to content
Snippets Groups Projects
Commit 84ea6404 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Pb register globals

parent 0ae2ef4c
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,8 @@ $user->getrights('facture');
if (!$user->rights->facture->lire)
accessforbidden();
$facid=isset($_GET["facid"])?$_GET["facid"]:$_POST["facid"];
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
llxHeader('','Facture rcurrente','ch-facture.html#s-fac-facture-rec');
......@@ -57,7 +59,7 @@ if ($user->societe_id > 0)
// Ajout
if ($_POST["action"] == 'add')
{
$facturerec = new FactureRec($db, $_POST["facid"]);
$facturerec = new FactureRec($db, $facid);
$facturerec->titre = $_POST["titre"];
if ($facturerec->create($user) > 0)
......@@ -75,7 +77,7 @@ if ($_POST["action"] == 'add')
if ($_POST["action"] == 'delete' && $user->rights->facture->supprimer)
{
$fac = new FactureRec($db);
$fac->delete($_POST["facid"]);
$fac->delete($facid);
$facid = 0 ;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment