Update index.php

This commit is contained in:
BENKE Charlene 2021-07-19 10:42:11 +02:00 committed by GitHub
parent 29bdbe02f2
commit 49a74c2b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,7 @@ $socid = 0;
if ($user->socid) { if ($user->socid) {
$socid = $user->socid; $socid = $user->socid;
} }
$userid = $user->id;
// Security check // Security check
$result = restrictedArea($user, 'ticket', 0, '', '', '', ''); $result = restrictedArea($user, 'ticket', 0, '', '', '', '');
@ -96,7 +97,7 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) {
$endyear = GETPOST($param_year, 'int'); $endyear = GETPOST($param_year, 'int');
$shownb = GETPOST($param_shownb, 'alpha'); $shownb = GETPOST($param_shownb, 'alpha');
$showtot = GETPOST($param_showtot, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha');
} else { } elseif (!empty($_COOKIE['DOLUSERCOOKIE_ticket_by_status'])) {
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_ticket_by_status'], true); $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_ticket_by_status'], true);
$endyear = $tmparray['year']; $endyear = $tmparray['year'];
$shownb = $tmparray['shownb']; $shownb = $tmparray['shownb'];
@ -104,6 +105,7 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) {
} }
if (empty($shownb) && empty($showtot)) { if (empty($shownb) && empty($showtot)) {
$showtot = 1; $showtot = 1;
$shownb = 0;
} }
$nowarray = dol_getdate(dol_now(), true); $nowarray = dol_getdate(dol_now(), true);