Compare commits

..

7 Commits

5 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal" created-in="IU-253.32098.101">
<component name="dataSourceStorageLocal" created-in="IU-261.25134.95">
<data-source name="articles" uuid="315cb5c9-2b0f-435b-b602-59823b160908">
<database-info product="SQLite" version="3.51.1" jdbc-version="4.2" driver-name="SQLite JDBC" driver-version="3.51.1.0" dbms="SQLITE" exact-version="3.51.1" exact-driver-version="3.51">
<identifier-quote-string>&quot;</identifier-quote-string>
-1
View File
@@ -1,5 +1,4 @@
<?php
include_once 'php/controller/profile-controller.php';
$user = $user ?? null;
$isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
+1
View File
@@ -5,6 +5,7 @@ if (session_status() === PHP_SESSION_NONE) {
include_once "includes/csrf.php";
include_once "php/controller/index-controller.php";
?>
<!DOCTYPE html>
<html lang="de">
<head>
+2
View File
@@ -20,6 +20,8 @@ if ($pfad === "login") {
include_once "php/controller/confirm-register-controller.php";
} elseif ($pfad === "confirm-password") {
include_once "php/controller/confirm-password-controller.php";
} elseif ($pfad === "profile") {
include_once "php/controller/profile-controller.php";
} elseif ($pfad === "updateComment") {
include_once "php/controller/updateComment-controller.php";
} elseif($pfad === "deleteComment") {
+8 -3
View File
@@ -63,9 +63,12 @@ class DatabaseArticleManager implements ArticleManagerDAO {
VALUES (:title, :content, :author, :category, :tags);";
$command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
// Verknüpft die übergebenen Parameter exakt mit den SQL-Platzhaltern
$command->execute([
$success = $command->execute([
":title" => $title,
":content" => $content,
":author" => $author,
@@ -73,10 +76,13 @@ class DatabaseArticleManager implements ArticleManagerDAO {
":tags" => $tags
]);
if (!$success) {
throw new InternalServerErrorException("internal_error");
}
return intval($db->lastInsertId());
} catch (PDOException $e) {
throw new InternalServerErrorException("internal_error");
}
}
@@ -321,7 +327,6 @@ class DatabaseArticleManager implements ArticleManagerDAO {
}
}
/**
* Holt alle User-IDs, die einen bestimmten Beitrag geliked haben.
*