diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index 777973ca035..95f3968d84b 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2022 Alexandre Spangaro - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -88,7 +88,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('tax', ' } /*if ($action == 'setdatep' && GETPOST('datepday') && $user->hasRight('tax', 'charges', 'creer')) { - $datepaye = dol_mktime(GETPOST('datephour', 'int'), GETPOST('datepmin', 'int'), GETPOST('datepsec', 'int'), GETPOST('datepmonth', 'int'), GETPOST('datepday', 'int'), GETPOST('datepyear', 'int')); + $datepaye = dol_mktime(GETPOSTINT('datephour'), GETPOSTINT('datepmin'), GETPOSTINT('datepsec'), GETPOSTINT('datepmonth'), GETPOSTINT('datepday'), GETPOSTINT('datepyear')); $res = $object->update_date($datepaye); if ($res === 0) { setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs'); @@ -257,7 +257,7 @@ if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION')) { if ($user->socid == 0 && $object->statut == 0 && $action == '') { if ($user->hasRight('facture', 'paiement')){ - print ''.$langs->trans('Valid').''; + print ''.$langs->trans('Valid').''; } } } diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 5ea27856e14..c8a9a1ef953 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -9,7 +9,7 @@ * Copyright (C) 2017-2022 Ferran Marcet * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2019-2020 Christophe Battarel - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * * 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 @@ -950,13 +950,13 @@ if ($id > 0 || !empty($ref)) { print ''; if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) { print ''; - $dlcdatesuffix = dol_mktime(0, 0, 0, GETPOST('dlc'.$suffix.'month'), GETPOST('dlc'.$suffix.'day'), GETPOST('dlc'.$suffix.'year')); + $dlcdatesuffix = dol_mktime(0, 0, 0, GETPOSTINT('dlc'.$suffix.'month'), GETPOSTINT('dlc'.$suffix.'day'), GETPOSTINT('dlc'.$suffix.'year')); print $form->selectDate($dlcdatesuffix, 'dlc'.$suffix, 0, 0, 1, ''); print ''; } if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) { print ''; - $dluodatesuffix = dol_mktime(0, 0, 0, GETPOST('dluo'.$suffix.'month'), GETPOST('dluo'.$suffix.'day'), GETPOST('dluo'.$suffix.'year')); + $dluodatesuffix = dol_mktime(0, 0, 0, GETPOSTINT('dluo'.$suffix.'month'), GETPOSTINT('dluo'.$suffix.'day'), GETPOSTINT('dluo'.$suffix.'year')); print $form->selectDate($dluodatesuffix, 'dluo'.$suffix, 0, 0, 1, ''); print ''; } diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index 53e07ae1c73..a21f6041664 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -3,6 +3,7 @@ * Copyright (C) 2018 All-3kcis * Copyright (C) 2021 Noé Cendrier * Copyright (C) 2024 Frédéric France + * Copyright (C) 2025 MDW * * 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 @@ -241,7 +242,7 @@ if (empty($reshook)) { } /* if ($action == 'setcommissionning_date' && $permissiontoadd && ! GETPOST('cancel', 'alpha')) { - $newvalue = dol_mktime(12, 0, 0, GETPOST('commissionning_datemonth', 'int'), GETPOST('commissionning_dateday', 'int'), GETPOST('commissionning_dateyear', 'int')); + $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('commissionning_datemonth', 'int'), GETPOSTINT('commissionning_dateday', 'int'), GETPOSTINT('commissionning_dateyear', 'int')); $result = $object->setValueFrom('commissionning_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); if ($result < 0) { setEventMessages($object->error, null, 'errors'); diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index ac59f574506..fb4878b5f08 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -1,7 +1,7 @@ * Copyright (C) 2018-2024 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * * 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 @@ -226,14 +226,14 @@ if (isModEnabled('productbatch') && print ''; if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) { print ''.$langs->trans("SellByDate").''; - $sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); + $sellbyselected = dol_mktime(0, 0, 0, GETPOSTINT('sellbymonth'), GETPOSTINT('sellbyday'), GETPOSTINT('sellbyyear')); // If form was opened for a specific pdluoid, field is disabled print $form->selectDate(($pdluo->id > 0 ? $pdluo->sellby : $sellbyselected), 'sellby', 0, 0, 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); print ''; } if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) { print ''.$langs->trans("EatByDate").''; - $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); + $eatbyselected = dol_mktime(0, 0, 0, GETPOSTINT('eatbymonth'), GETPOSTINT('eatbyday'), GETPOSTINT('eatbyyear')); // If form was opened for a specific pdluoid, field is disabled print $form->selectDate(($pdluo->id > 0 ? $pdluo->eatby : $eatbyselected), 'eatby', 0, 0, 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); print ''; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index f416f4fc55d..21fea1424d9 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -8,9 +8,8 @@ * Copyright (C) 2016 Josep Lluís Amador * Copyright (C) 2021-2023 Gauthier VERDOL * Copyright (C) 2021 Noé Cendrier - * Copyright (C) 2023 Frédéric France wfrederic.france@free.fr> - * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2023-2024 Frédéric France + * Copyright (C) 2024-2025 MDW * 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 * the Free Software Foundation; either version 3 of the License, or @@ -158,8 +157,8 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $datesrfc = GETPOST('datesrfc'); // deprecated $dateerfc = GETPOST('dateerfc'); // deprecated -$dates = dol_mktime(0, 0, 0, GETPOST('datesmonth'), GETPOST('datesday'), GETPOST('datesyear')); -$datee = dol_mktime(23, 59, 59, GETPOST('dateemonth'), GETPOST('dateeday'), GETPOST('dateeyear')); +$dates = dol_mktime(0, 0, 0, GETPOSTINT('datesmonth'), GETPOSTINT('datesday'), GETPOSTINT('datesyear')); +$datee = dol_mktime(23, 59, 59, GETPOSTINT('dateemonth'), GETPOSTINT('dateeday'), GETPOSTINT('dateeyear')); if (empty($dates) && !empty($datesrfc)) { // deprecated $dates = dol_stringtotime($datesrfc); } @@ -917,7 +916,7 @@ foreach ($listofreferent as $key => $value) { if (!empty($loanScheduleStatic->lines)) { foreach ($loanScheduleStatic->lines as $loanSchedule) { /** - * @var $loanSchedule LoanSchedule + * @var LoanSchedule $loanSchedule */ if (($loanSchedule->datep >= $dates && $loanSchedule->datep <= $datee) // dates filter is defined || !empty($dates) && empty($datee) && $loanSchedule->datep >= $dates && $loanSchedule->datep <= dol_now() diff --git a/htdocs/reception/dispatch.php b/htdocs/reception/dispatch.php index 8a08ff920ff..905a96f9492 100644 --- a/htdocs/reception/dispatch.php +++ b/htdocs/reception/dispatch.php @@ -9,7 +9,7 @@ * Copyright (C) 2017-2022 Ferran Marcet * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2019-2020 Christophe Battarel - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * * 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 @@ -756,13 +756,13 @@ if ($id > 0 || !empty($ref)) { print ''; if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) { print ''; - $dlcdatesuffix = !empty($objd->sellby) ? dol_stringtotime($objd->sellby) : dol_mktime(0, 0, 0, GETPOST('dlc'.$suffix.'month'), GETPOST('dlc'.$suffix.'day'), GETPOST('dlc'.$suffix.'year')); + $dlcdatesuffix = !empty($objd->sellby) ? dol_stringtotime($objd->sellby) : dol_mktime(0, 0, 0, GETPOSTINT('dlc'.$suffix.'month'), GETPOSTINT('dlc'.$suffix.'day'), GETPOSTINT('dlc'.$suffix.'year')); print $form->selectDate($dlcdatesuffix, 'dlc'.$suffix, 0, 0, 1, ''); print ''; } if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) { print ''; - $dluodatesuffix = !empty($objd->eatby) ? dol_stringtotime($objd->eatby) : dol_mktime(0, 0, 0, GETPOST('dluo'.$suffix.'month'), GETPOST('dluo'.$suffix.'day'), GETPOST('dluo'.$suffix.'year')); + $dluodatesuffix = !empty($objd->eatby) ? dol_stringtotime($objd->eatby) : dol_mktime(0, 0, 0, GETPOSTINT('dluo'.$suffix.'month'), GETPOSTINT('dluo'.$suffix.'day'), GETPOSTINT('dluo'.$suffix.'year')); print $form->selectDate($dluodatesuffix, 'dluo'.$suffix, 0, 0, 1, ''); print ''; } @@ -929,13 +929,13 @@ if ($id > 0 || !empty($ref)) { print ''; if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) { print ''; - $dlcdatesuffix = dol_mktime(0, 0, 0, GETPOST('dlc'.$suffix.'month'), GETPOST('dlc'.$suffix.'day'), GETPOST('dlc'.$suffix.'year')); + $dlcdatesuffix = dol_mktime(0, 0, 0, GETPOSTINT('dlc'.$suffix.'month'), GETPOSTINT('dlc'.$suffix.'day'), GETPOSTINT('dlc'.$suffix.'year')); print $form->selectDate($dlcdatesuffix, 'dlc'.$suffix, 0, 0, 1, ''); print ''; } if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) { print ''; - $dluodatesuffix = dol_mktime(0, 0, 0, GETPOST('dluo'.$suffix.'month'), GETPOST('dluo'.$suffix.'day'), GETPOST('dluo'.$suffix.'year')); + $dluodatesuffix = dol_mktime(0, 0, 0, GETPOSTINT('dluo'.$suffix.'month'), GETPOSTINT('dluo'.$suffix.'day'), GETPOSTINT('dluo'.$suffix.'year')); print $form->selectDate($dluodatesuffix, 'dluo'.$suffix, 0, 0, 1, ''); print ''; }