debugging

This commit is contained in:
NOrtmann1
2026-06-10 17:23:36 +02:00
parent a0932fed04
commit e0fbd220f0
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
exit(); exit();
} }
/*try { try {
$articleManager = ArticleManager::getInstance(); $articleManager = ArticleManager::getInstance();
$articleManager->deleteArticle($id, $user); $articleManager->deleteArticle($id, $user);
@@ -30,7 +30,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
$_SESSION["message"] = $e->getMessage(); $_SESSION["message"] = $e->getMessage();
header("location: ../../index.php?pfad=profile"); header("location: ../../index.php?pfad=profile");
exit(); exit();
}*/ }
$_SESSION["message"] = "article_deleted"; $_SESSION["message"] = "article_deleted";
header("location: ../../index.php?pfad=profile"); header("location: ../../index.php?pfad=profile");
+1 -1
View File
@@ -147,7 +147,7 @@ class DatabaseArticleManager implements ArticleManagerDAO {
public function deleteArticle($id, $author) public function deleteArticle($id, $author)
{ {
$article = getArticle($id); $article = $this->getArticle($id);
if (empty($article)) { if (empty($article)) {
throw new NotFoundException("not_found_article"); throw new NotFoundException("not_found_article");
} }