From 1937a2f49ebe920b79604cb5df3649f9f1dff738 Mon Sep 17 00:00:00 2001 From: polo-pc-greta Date: Mon, 7 Apr 2025 21:38:12 +0200 Subject: =?UTF-8?q?bouton=20suppression=20apr=C3=A8s=20cr=C3=A9ation=20d'u?= =?UTF-8?q?ne=20"news"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/ajax.php | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/controller') diff --git a/src/controller/ajax.php b/src/controller/ajax.php index 4863681..a4b61e4 100644 --- a/src/controller/ajax.php +++ b/src/controller/ajax.php @@ -29,10 +29,6 @@ if($_SERVER['CONTENT_TYPE'] === 'application/json' && isset($_GET['action'])) } else{ $content = Security::secureString($json['content']); - if($content === ''){ - echo json_encode(['success' => false, 'message' => 'pas de données à sauvegarder']); - die; - } } // nouvel article @@ -43,12 +39,7 @@ if($_SERVER['CONTENT_TYPE'] === 'application/json' && isset($_GET['action'])) $node = $director->getNode(); // =
if(is_array($content)){ - // - //$timestamp = time(); // int $date = new \DateTime($content['d']); - - //echo substr($content['i'], 1) . ' '; - //echo $article_id;die; $article = new Article($content['i'], $date, $content['t'], $content['p']); $article_node = new Node('new', 'i' . (string)$date->getTimestamp(), [], count($node->getChildren()) + 1, $node, $node->getPage(), $article); -- cgit v1.2.3