From f825537b52db30f3bb6feb717913ff1b6c1fd9c7 Mon Sep 17 00:00:00 2001 From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com> Date: Wed, 27 May 2026 19:20:14 +0200 Subject: [PATCH] testing --- php/controller/createArticle-controller.php | 2 +- php/model/LocalArticleManager.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/php/controller/createArticle-controller.php b/php/controller/createArticle-controller.php index c11b0aa..a789cc2 100644 --- a/php/controller/createArticle-controller.php +++ b/php/controller/createArticle-controller.php @@ -20,7 +20,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { $author = "max.mustermann"; // TODO: später aus Session den angemeldeten Nutzer beziehen. $tags = $_POST["tags"]; - //$articleManager->addArticle($title, $content, $category, $author, $tags); + $articleManager->addArticle($title, $content, $category, $author, $tags); foreach ($articleManager->getAllArticles() as $article) { echo htmlspecialchars($article['title'])."
"; } diff --git a/php/model/LocalArticleManager.php b/php/model/LocalArticleManager.php index 82bfb11..42fe495 100644 --- a/php/model/LocalArticleManager.php +++ b/php/model/LocalArticleManager.php @@ -44,13 +44,13 @@ class LocalArticleManager implements ArticleManagerDAO { $articles = $this->getAllArticles(); $articles[] = [ - "id" => count($articles)+1, + //"id" => count($articles)+1, "title" => $title, "content" => $content, "author" => $author, "category" => $category, "tags" => $tags, - "creationDate" => date("Y-m-d H:i:s") + //"creationDate" => date("Y-m-d H:i:s") ]; $this->saveArticle($articles);