Beitrag erstellen #13

Merged
niklas.ortmann merged 164 commits from Beitrag-erstellen into dev 2026-05-29 13:22:11 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit f825537b52 - Show all commits
+1 -1
View File
@@ -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'])."<br>";
}
+2 -2
View File
@@ -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);