Merge pull request #27679 from thibdrev/patch-5

qual: phsptan
This commit is contained in:
Laurent Destailleur 2024-01-19 20:49:45 +01:00 committed by GitHub
commit 6ef40b037e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,7 +42,7 @@ if ($user->socid > 0) {
$socid = $user->socid;
}
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year', 'int') > 0 ? GETPOST('year', 'int') : $nowyear;
$year = GETPOSTINT('year') > 0 ? GETPOSTINT('year') : $nowyear;
$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;