Opt-In & Optimierung für Datenschutz und Nutzungsbedingungen #67

Merged
niklas.ortmann merged 12 commits from devNachCSRF into dev 2026-07-20 00:13:17 +02:00
3 changed files with 10 additions and 4 deletions
Showing only changes of commit f957f252d1 - Show all commits
-1
View File
@@ -1,5 +1,4 @@
<?php <?php
include_once 'php/controller/profile-controller.php';
$user = $user ?? null; $user = $user ?? null;
$isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error); $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
+2
View File
@@ -20,6 +20,8 @@ if ($pfad === "login") {
include_once "php/controller/confirm-register-controller.php"; include_once "php/controller/confirm-register-controller.php";
} elseif ($pfad === "confirm-password") { } elseif ($pfad === "confirm-password") {
include_once "php/controller/confirm-password-controller.php"; include_once "php/controller/confirm-password-controller.php";
} elseif ($pfad === "profile") {
include_once "php/controller/profile-controller.php";
} elseif ($pfad === "updateComment") { } elseif ($pfad === "updateComment") {
include_once "php/controller/updateComment-controller.php"; include_once "php/controller/updateComment-controller.php";
} elseif($pfad === "deleteComment") { } elseif($pfad === "deleteComment") {
+8 -3
View File
@@ -63,9 +63,12 @@ class DatabaseArticleManager implements ArticleManagerDAO {
VALUES (:title, :content, :author, :category, :tags);"; VALUES (:title, :content, :author, :category, :tags);";
$command = $db->prepare($sql); $command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
// Verknüpft die übergebenen Parameter exakt mit den SQL-Platzhaltern // Verknüpft die übergebenen Parameter exakt mit den SQL-Platzhaltern
$command->execute([ $success = $command->execute([
":title" => $title, ":title" => $title,
":content" => $content, ":content" => $content,
":author" => $author, ":author" => $author,
@@ -73,10 +76,13 @@ class DatabaseArticleManager implements ArticleManagerDAO {
":tags" => $tags ":tags" => $tags
]); ]);
if (!$success) {
throw new InternalServerErrorException("internal_error");
}
return intval($db->lastInsertId()); return intval($db->lastInsertId());
} catch (PDOException $e) { } catch (PDOException $e) {
throw new InternalServerErrorException("internal_error"); throw new InternalServerErrorException("internal_error");
} }
} }
@@ -321,7 +327,6 @@ class DatabaseArticleManager implements ArticleManagerDAO {
} }
} }
/** /**
* Holt alle User-IDs, die einen bestimmten Beitrag geliked haben. * Holt alle User-IDs, die einen bestimmten Beitrag geliked haben.
* *