Qual: Fix phan: dol_mktime GETPOST args to GETPOSTINT

This commit is contained in:
MDW 2025-02-08 14:06:14 +01:00
parent 43ed58a0e9
commit 23ff8b378c
No known key found for this signature in database
6 changed files with 21 additions and 21 deletions

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* 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 '<a class="butAction" href="card.php?id='.GETPOST('id', 'int').'&amp;facid='.$objp->facid.'&amp;action=valide">'.$langs->trans('Valid').'</a>';
print '<a class="butAction" href="card.php?id='.GETPOSTINT('id').'&amp;facid='.$objp->facid.'&amp;action=valide">'.$langs->trans('Valid').'</a>';
}
}
}

View File

@ -9,7 +9,7 @@
* Copyright (C) 2017-2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2020 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 '</td>';
if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) {
print '<td class="nowraponall">';
$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 '</td>';
}
if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) {
print '<td class="nowraponall">';
$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 '</td>';
}

View File

@ -3,6 +3,7 @@
* Copyright (C) 2018 All-3kcis <contact@all-3kcis.fr>
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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');

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 '<tr>';
if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) {
print '<td'.($sellByCss ? ' class="'.$sellByCss.'"' : '').'>'.$langs->trans("SellByDate").'</td><td>';
$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 '</td>';
}
if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) {
print '<td'.($eatByCss ? ' class="'.$eatByCss.'"' : '').'>'.$langs->trans("EatByDate").'</td><td>';
$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 '</td>';

View File

@ -8,9 +8,8 @@
* Copyright (C) 2016 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2021-2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
* Copyright (C) 2023 Frédéric France wfrederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* 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()

View File

@ -9,7 +9,7 @@
* Copyright (C) 2017-2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2020 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 '</td>';
if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) {
print '<td class="nowraponall">';
$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 '</td>';
}
if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) {
print '<td class="nowraponall">';
$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 '</td>';
}
@ -929,13 +929,13 @@ if ($id > 0 || !empty($ref)) {
print '</td>';
if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) {
print '<td class="nowraponall">';
$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 '</td>';
}
if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) {
print '<td class="nowraponall">';
$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 '</td>';
}