From 82254c2f7958ba2360b6867dfd577e881c3f59d5 Mon Sep 17 00:00:00 2001 From: clfreville2 Date: Sun, 11 Dec 2022 12:04:07 +0100 Subject: [PATCH] =?UTF-8?q?Retiens=20le=20pr=C3=A9c=C3=A9dent=20nom=20d'un?= =?UTF-8?q?=20visiteur=20non=20connect=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Silex/Controller/VisitorController.php | 1 + views/newsView.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Silex/Controller/VisitorController.php b/src/Silex/Controller/VisitorController.php index 935cafe..f9425c2 100644 --- a/src/Silex/Controller/VisitorController.php +++ b/src/Silex/Controller/VisitorController.php @@ -53,6 +53,7 @@ class VisitorController { if ($author !== null) { $comment->setAuthor($author); } else { + $_SESSION['previous_name'] = $_POST['name']; $comment->setAuthorName($_POST['name']); } $di->getCommentGateway()->insert($comment); diff --git a/views/newsView.php b/views/newsView.php index 8daf54a..7941c74 100644 --- a/views/newsView.php +++ b/views/newsView.php @@ -39,7 +39,7 @@ $title = $news->getTitle();
- +