diff options
Diffstat (limited to 'src/controller')
-rw-r--r-- | src/controller/ajax.php | 2 | ||||
-rw-r--r-- | src/controller/post.php | 2 |
2 files changed, 2 insertions, 2 deletions
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'){ | |||
369 | $data = file_get_contents('php://input'); | 369 | $data = file_get_contents('php://input'); |
370 | $json = json_decode($data, true); | 370 | $json = json_decode($data, true); |
371 | 371 | ||
372 | // tite de la page | 372 | // titre de la page |
373 | if($_GET['page_edit'] === 'page_title'){ | 373 | if($_GET['page_edit'] === 'page_title'){ |
374 | $page = $entityManager->find('App\Entity\Page', $json['page_id']); | 374 | $page = $entityManager->find('App\Entity\Page', $json['page_id']); |
375 | $page->setPageName(htmlspecialchars($json['title'])); | 375 | $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) | |||
55 | $node->useDefaultAttributes(); // fichiers CSS et JS | 55 | $node->useDefaultAttributes(); // fichiers CSS et JS |
56 | 56 | ||
57 | $data = new NodeData([ | 57 | $data = new NodeData([ |
58 | 'title' => trim(htmlspecialchars($_POST["page_name"])), | 58 | // pas de titre, il est dans $page |
59 | 'description' => trim(htmlspecialchars($_POST["page_description"]))], | 59 | 'description' => trim(htmlspecialchars($_POST["page_description"]))], |
60 | $node); | 60 | $node); |
61 | 61 | ||