From e3985368db305aeff69c5731b8da313a4b21fbb9 Mon Sep 17 00:00:00 2001 From: William Mead Date: Mon, 22 Jan 2024 15:09:19 +0100 Subject: [PATCH 1/2] Fixed types --- htdocs/fichinter/card-rec.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index aa2bfdbe877..3929c3c9316 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -141,7 +141,7 @@ if ($action == 'add') { } // gestion des fréquences et des échéances - $frequency = GETPOST('frequency', 'int'); + $frequency = GETPOSTINT('frequency'); $reyear = GETPOST('reyear'); $remonth = GETPOST('remonth'); $reday = GETPOST('reday'); @@ -167,14 +167,14 @@ if ($action == 'add') { $object->id_origin = $id; $object->title = GETPOST('titre', 'alpha'); $object->description = GETPOST('description', 'restricthtml'); - $object->socid = GETPOST('socid', 'alpha'); - $object->fk_project = GETPOST('projectid', 'int'); - $object->fk_contract = GETPOST('contractid', 'int'); + $object->socid = GETPOSTINT('socid'); + $object->fk_project = GETPOSTINT('projectid'); + $object->fk_contrat = GETPOSTINT('contractid'); $object->frequency = $frequency; $object->unit_frequency = GETPOST('unit_frequency', 'alpha'); $object->nb_gen_max = $nb_gen_max; - $object->auto_validate = GETPOST('auto_validate', 'int'); + $object->auto_validate = GETPOSTINT('auto_validate'); $object->date_when = $date_next_execution; @@ -198,7 +198,7 @@ if ($action == 'add') { $newinter->fk_project = $object->fk_project; $newinter->fk_contrat = $object->fk_contrat; } else { - $newinter->socid = GETPOST("socid"); + $newinter->socid = GETPOSTINT("socid"); } $newinter->entity = $object->entity; @@ -357,7 +357,7 @@ if ($action == 'create') { if (isModEnabled('contrat')) { $formcontract = new FormContract($db); print "".$langs->trans("Contract").""; - $contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contract) ? $object->fk_contract : 0) ; + $contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contrat) ? $object->fk_contrat : 0) ; $numcontract = $formcontract->select_contract($object->thirdparty->id, $contractid, 'contracttid'); print ""; } From 2751fedfdea2c86c95d32abbcd4fa0385a6f5c39 Mon Sep 17 00:00:00 2001 From: William Mead Date: Mon, 22 Jan 2024 15:10:01 +0100 Subject: [PATCH 2/2] Added contributor details --- htdocs/fichinter/card-rec.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 3929c3c9316..c832ca2b2ba 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -9,6 +9,7 @@ * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016-2018 Charlie Benke * Copyright (C) 2018-2021 Frédéric France + * Copyright (C) 2024 William Mead * * 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