From fbda1c87cde2be15cf279c3b4aa243d070007e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Fali=C3=A8re?= Date: Tue, 9 May 2023 14:38:20 +0200 Subject: [PATCH] FIX token errors on public interface --- htdocs/public/ticket/index.php | 2 +- htdocs/public/ticket/list.php | 5 +++-- htdocs/public/ticket/view.php | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index e4e46938122..692656f8ad1 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -86,7 +86,7 @@ print '

'.(getDolGlobalString("TICKET_PUBLIC_TEXT_H print '
'; print '

'; -print '

'.dol_escape_htmltag($langs->trans("CreateTicket")).'
'; +print '

'.dol_escape_htmltag($langs->trans("CreateTicket")).'
'; print '

'.dol_escape_htmltag($langs->trans("ViewMyTicketList")).'
'; print '
'.img_picto('', 'ticket', 'class="fa-15"').'
'.dol_escape_htmltag($langs->trans("ShowTicketWithTrackId")).'
'; print '
'; diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 9ac4b25cb04..f03d9aaea76 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -195,7 +195,6 @@ llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); if ($action == "view_ticketlist") { - print '
'; print '
'; print '
'; @@ -236,6 +235,8 @@ if ($action == "view_ticketlist") { $param .= '&entity='.((int) $entity); } + $param .= '&token='.newToken(); + // Definition of fields for list $arrayfields = array( 't.datec' => array('label' => $langs->trans("Date"), 'checked' => 1), @@ -415,6 +416,7 @@ if ($action == "view_ticketlist") { // Search bar print '
'."\n"; print ''; + print ''; print ''; print ''; print ''; @@ -724,7 +726,6 @@ if ($action == "view_ticketlist") { } print '
'; - print '
'; } else { print '
'; diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index 9f2eee2a6ea..04ffd53f2f3 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -171,7 +171,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a if ($object->dao->close($user)) { setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs'); - $url = 'view.php?action=view_ticket&track_id='.GETPOST('track_id', 'alpha').(!empty($entity) && isModEnabled('multicompany')?'&entity='.$entity:''); + $url = 'view.php?action=view_ticket&track_id='.GETPOST('track_id', 'alpha').(!empty($entity) && isModEnabled('multicompany')?'&entity='.$entity:'').'&token='.newToken(); header("Location: ".$url); exit; } else { @@ -372,11 +372,11 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a if ($object->dao->fk_statut < Ticket::STATUS_CLOSED) { // New message - print ''; + print ''; // Close ticket if ($object->dao->fk_statut >= Ticket::STATUS_NOT_READ && $object->dao->fk_statut < Ticket::STATUS_CLOSED) { - print ''; + print ''; } }