diff --git a/php/controller/updateArticle-controller.php b/php/controller/updateArticle-controller.php index 8e54b87..16fa90f 100644 --- a/php/controller/updateArticle-controller.php +++ b/php/controller/updateArticle-controller.php @@ -33,31 +33,31 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { // -------------------------------- Validierung der Daten: ------------------------- if (!articleAuthorValidator($author)) { $_SESSION["message"] = "author_not_valid"; - header("location: ../../index.php?pfad=updateArticle"); + header("location: ../../index.php?pfad=updateArticle&id=$id"); exit(); } if (!articleTitleValidator($title)) { $_SESSION["message"] = "invalid_title"; - header("location: ../../index.php?pfad=updateArticle"); + header("location: ../../index.php?pfad=updateArticle&id=$id"); exit(); } if (!articleContentValidator($content)) { $_SESSION["message"] = "invalid_content"; - header("location: ../../index.php?pfad=updateArticle"); + header("location: ../../index.php?pfad=updateArticle&id=$id"); exit(); } if (!articleCategoryValidator($category)) { $_SESSION["message"] = "invalid_category"; - header("location: ../../index.php?pfad=updateArticle"); + header("location: ../../index.php?pfad=updateArticle&id=$id"); exit(); } if (!articleTagValidator($tags)) { $_SESSION["message"] = "invalid_tags"; - header("location: ../../index.php?pfad=updateArticle"); + header("location: ../../index.php?pfad=updateArticle&id=$id"); exit(); } else { $cleanedTags = []; @@ -83,7 +83,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { $articleManager->updateArticle($id ,$article, $author); } catch (Exception $e){ $_SESSION["message"] = $e->getMessage(); - header("location: ../../index.php?pfad=updateArticle=$id"); + header("location: ../../index.php?pfad=updateArticle&id=$id"); exit(); } $_SESSION["message"] = "article_updated";