Kommentarfunktion für Nutzer einschränken
This commit is contained in:
@@ -8,7 +8,7 @@ require_once "../model/CommentManager.php";
|
||||
if (!isset($_SESSION["user_email"])) {
|
||||
echo json_encode([
|
||||
"success" => false,
|
||||
"message" => "Du musst angemeldet sein."
|
||||
"message" => "Du musst angemeldet sein, um zu kommentieren."
|
||||
]);
|
||||
exit();
|
||||
}
|
||||
@@ -17,7 +17,7 @@ $articleId = $_POST["article_id"] ?? null;
|
||||
$content = trim($_POST["content"] ?? "");
|
||||
$parentCommentId = $_POST["parent_comment_id"] ?? null;
|
||||
|
||||
if ($parentCommentId === "") {
|
||||
if ($parentCommentId === "" || $parentCommentId === "0") {
|
||||
$parentCommentId = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user