From 7d0c3dcf6d64b61893c4d0158c2a285f14bd49bc Mon Sep 17 00:00:00 2001 From: Dorian Vabre Date: Mon, 10 May 2021 15:50:29 +0200 Subject: [PATCH] transition done from cookies to session --- htdocs/public/project/viewandvote.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index 333edd81755..0468a9c2e59 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -76,13 +76,6 @@ if ($securekeytocompare != $securekeyreceived) { $listofvotes = explode(',', $_SESSION["savevotes"]); -if (GETPOST("votestatus")=="ok") { - setEventMessage($langs->trans("VoteOk"), 'mesgs'); -} else if (GETPOST("votestatus")=="ko") { - setEventMessage($langs->trans("AlreadyVoted"), 'warnings'); -} else if (GETPOST("votestatus")=="err") { - setEventMessage($langs->trans("VoteError"), 'warnings'); -} // Define $urlwithroot //$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); @@ -186,7 +179,15 @@ if (strlen($idvote)) { } } } - header("Refresh:0;url=".dol_buildpath('/public/project/viewandvote.php?votestatus='.$votestatus.'&id='.$id.'&securekey=', 1).$securekeyreceived); + if ($votestatus=="ok") { + setEventMessage($langs->trans("VoteOk"), 'mesgs'); + } else if ($votestatus=="ko") { + setEventMessage($langs->trans("AlreadyVoted"), 'warnings'); + } else if ($votestatus=="err") { + setEventMessage($langs->trans("VoteError"), 'warnings'); + } + header("Refresh:0;url=".dol_buildpath('/public/project/viewandvote.php?id='.$id.'&securekey=', 1).$securekeyreceived); + exit; }