updateArticle Anpassungen

This commit is contained in:
NOrtmann1
2026-05-29 17:36:29 +01:00
parent 29e23a8d3b
commit 32cb8a9d9e
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -62,7 +62,7 @@ class LocalArticleManager implements ArticleManagerDAO {
$this->saveArticle($articles);
}
public function updateArticle($article, $author)
public function updateArticle($id, $article, $author)
{
if (empty($article)) {
return;
@@ -79,9 +79,9 @@ class LocalArticleManager implements ArticleManagerDAO {
// Beitrag aktualisieren:
foreach ($articles as $index => $storedArticle) {
if (isset($storedArticle['id']) && $storedArticle['id'] == $article->getId()) {
if (isset($storedArticle['id']) && $storedArticle['id'] == $id) {
$articles[$index] = [
"id" => $article->getId(),
"id" => $id,
"title" => $article->getTitle(),
"content" => $article->getContent(),
"author" => $article->getAuthor(),