From a7a85ac513558050bae673f5d4d786d5a73651cd Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 11 Nov 2011 16:10:50 +0100 Subject: [PATCH] Fix: uniform code --- htdocs/compta/facture/impayees.php | 98 +++++++++++++++--------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 9641c2d2e59..1e12f450c09 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2005 Rodolphe Quiedeville * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,21 +34,22 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'); $langs->load("bills"); -$facid = isset($_GET["facid"])?$_GET["facid"]:''; -$option = $_REQUEST["option"]; +$id = (GETPOST('facid','int') ? GETPOST('facid','int') : GETPOST('id','int')); +$action = GETPOST('action','alpha'); +$option = GETPOST('option'); $diroutputpdf=$conf->facture->dir_output . '/unpaid/temp'; // Security check if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user,'facture',$facid,''); +$result = restrictedArea($user,'facture',$id,''); /* * Action */ -if ($_POST["action"] == "builddoc" && $user->rights->facture->lire) +if ($action == "builddoc" && $user->rights->facture->lire) { if (is_array($_POST['toGenerate'])) { @@ -142,7 +143,7 @@ $form = new Form($db); $formfile = new FormFile($db); ?> -