From f86bdfd2ead5df2bba84360bbead298e1508e717 Mon Sep 17 00:00:00 2001 From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com> Date: Wed, 27 May 2026 18:02:30 +0200 Subject: [PATCH] testing --- php/model/LocalArticleManager.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/php/model/LocalArticleManager.php b/php/model/LocalArticleManager.php index 2ddaf6a..cad0086 100644 --- a/php/model/LocalArticleManager.php +++ b/php/model/LocalArticleManager.php @@ -36,11 +36,16 @@ class LocalArticleManager implements ArticleManagerDAO { */ public function saveArticle($articles) { - file_put_contents( + /*file_put_contents( $this->file, json_encode($articles, JSON_PRETTY_PRINT) ); + */ + foreach ($articles as $article){ + echo $article; + echo "
"; + } } public function addArticle($title, $content, $author, $category, array $tags) @@ -57,7 +62,7 @@ class LocalArticleManager implements ArticleManagerDAO { "creationDate" => date("Y-m-d H:i:s") ]; - $this->saveArticle($articles); + $this->saveArticle($articles[]); } public function updateArticle($id, $title, $content, $author)