Fix typing with idate

This commit is contained in:
MDW 2024-03-21 22:26:56 +01:00
parent 91a7f3b721
commit 4b438b4204
No known key found for this signature in database

View file

@ -11,6 +11,7 @@
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 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
@ -1043,13 +1044,13 @@ class FormOther
global $langs;
$week = array(
0=>$langs->trans("Day0"),
1=>$langs->trans("Day1"),
2=>$langs->trans("Day2"),
3=>$langs->trans("Day3"),
4=>$langs->trans("Day4"),
5=>$langs->trans("Day5"),
6=>$langs->trans("Day6")
0 => $langs->trans("Day0"),
1 => $langs->trans("Day1"),
2 => $langs->trans("Day2"),
3 => $langs->trans("Day3"),
4 => $langs->trans("Day4"),
5 => $langs->trans("Day5"),
6 => $langs->trans("Day6")
);
$select_week = '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
@ -1164,7 +1165,7 @@ class FormOther
{
$out = '';
$currentyear = date("Y") + $offset;
$currentyear = idate("Y") + $offset;
$max_year = $currentyear + $max_year;
$min_year = $currentyear - $min_year;
if (empty($selected) && empty($useempty)) {
@ -1252,7 +1253,7 @@ class FormOther
if (preg_match('/graph/', $box->class) && $conf->browser->layout != 'phone') {
$label = $label.' <span class="fas fa-chart-bar"></span>';
}
$arrayboxtoactivatelabel[$box->id] = array('label'=>$label, 'data-html'=>img_picto('', $box->boximg, 'class="pictofixedwidth"').$langs->trans($label)); // We keep only boxes not shown for user, to show into combo list
$arrayboxtoactivatelabel[$box->id] = array('label' => $label, 'data-html' => img_picto('', $box->boximg, 'class="pictofixedwidth"').$langs->trans($label)); // We keep only boxes not shown for user, to show into combo list
}
foreach ($boxidactivatedforuser as $boxid) {
if (empty($boxorder)) {
@ -1433,7 +1434,7 @@ class FormOther
$boxlistb .= "<!-- End box right container -->\n";
}
return array('selectboxlist'=>count($boxactivated) ? $selectboxlist : '', 'boxactivated'=>$boxactivated, 'boxlista'=>$boxlista, 'boxlistb'=>$boxlistb);
return array('selectboxlist' => count($boxactivated) ? $selectboxlist : '', 'boxactivated' => $boxactivated, 'boxlista' => $boxlista, 'boxlistb' => $boxlistb);
}