Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 75b4aa0b88 | |||
| 9146d395a2 | |||
| f957f252d1 | |||
| c22853d802 | |||
| 4abc5f4167 | |||
| 9f4343cc53 | |||
| a5998cffca |
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<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">
|
<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">
|
<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>"</identifier-quote-string>
|
<identifier-quote-string>"</identifier-quote-string>
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ if (session_status() === PHP_SESSION_NONE) {
|
|||||||
include_once "includes/csrf.php";
|
include_once "includes/csrf.php";
|
||||||
include_once "php/controller/index-controller.php";
|
include_once "php/controller/index-controller.php";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -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") {
|
||||||
|
|||||||
@@ -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.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user