From f724ce1c7432d5e67f01db25e6d1cdb9453b0882 Mon Sep 17 00:00:00 2001 From: polo Date: Thu, 22 May 2025 12:38:22 +0200 Subject: conflit titre de page dans NodeData --- src/controller/ajax.php | 2 +- src/controller/post.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/controller') diff --git a/src/controller/ajax.php b/src/controller/ajax.php index a820136..18f303b 100644 --- a/src/controller/ajax.php +++ b/src/controller/ajax.php @@ -369,7 +369,7 @@ if($_SERVER['CONTENT_TYPE'] === 'application/json'){ $data = file_get_contents('php://input'); $json = json_decode($data, true); - // tite de la page + // titre de la page if($_GET['page_edit'] === 'page_title'){ $page = $entityManager->find('App\Entity\Page', $json['page_id']); $page->setPageName(htmlspecialchars($json['title'])); diff --git a/src/controller/post.php b/src/controller/post.php index 2aa7780..deacafb 100644 --- a/src/controller/post.php +++ b/src/controller/post.php @@ -55,7 +55,7 @@ if($_SERVER['REQUEST_METHOD'] === 'POST' && $_SESSION['admin'] === true) $node->useDefaultAttributes(); // fichiers CSS et JS $data = new NodeData([ - 'title' => trim(htmlspecialchars($_POST["page_name"])), + // pas de titre, il est dans $page 'description' => trim(htmlspecialchars($_POST["page_description"]))], $node); -- cgit v1.2.3