Update showArticle-controller.php

This commit is contained in:
2026-07-17 15:53:15 +02:00
parent b96c588697
commit bd125c851f
@@ -25,6 +25,14 @@ if (isset($_GET["id"]) && !empty($_GET["id"])){
exit();
}
if($_GET["pfad"] == "updateArticle"){
if($article->getAuthor() != $_SESSION["user"]){
$_SESSION["message"] = "unauthorized_access";
header("location: ../../index.php");
exit();
}
}
$commentManager = CommentManager::getInstance();
$comments = $commentManager->getCommentsByArticle($_GET["id"]);