Beitrag erstellen #13

Merged
niklas.ortmann merged 164 commits from Beitrag-erstellen into dev 2026-05-29 13:22:11 +02:00
Showing only changes of commit f86bdfd2ea - Show all commits
+7 -2
View File
@@ -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 "<br>";
}
}
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)