From e0fbd220f09769557f43f37de33960106b95f821 Mon Sep 17 00:00:00 2001 From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:23:36 +0200 Subject: [PATCH] debugging --- php/controller/deleteArticle-controller.php | 6 +++--- php/model/DatabaseArticleManager.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/php/controller/deleteArticle-controller.php b/php/controller/deleteArticle-controller.php index 96f0307..bbf4428 100644 --- a/php/controller/deleteArticle-controller.php +++ b/php/controller/deleteArticle-controller.php @@ -21,7 +21,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { exit(); } - /*try { + try { $articleManager = ArticleManager::getInstance(); $articleManager->deleteArticle($id, $user); @@ -30,8 +30,8 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { $_SESSION["message"] = $e->getMessage(); header("location: ../../index.php?pfad=profile"); exit(); - }*/ - + } + $_SESSION["message"] = "article_deleted"; header("location: ../../index.php?pfad=profile"); exit(); diff --git a/php/model/DatabaseArticleManager.php b/php/model/DatabaseArticleManager.php index 1697071..83b4baa 100644 --- a/php/model/DatabaseArticleManager.php +++ b/php/model/DatabaseArticleManager.php @@ -147,7 +147,7 @@ class DatabaseArticleManager implements ArticleManagerDAO { public function deleteArticle($id, $author) { - $article = getArticle($id); + $article = $this->getArticle($id); if (empty($article)) { throw new NotFoundException("not_found_article"); }