Compare commits
15 Commits
b3f7db2615
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 32090df167 | |||
| 75b4aa0b88 | |||
| 9146d395a2 | |||
| f957f252d1 | |||
| 42816cd450 | |||
| 85cf357846 | |||
| 4c4a93865d | |||
| 0a87e4d9eb | |||
| c22853d802 | |||
| 4abc5f4167 | |||
| 240296f89b | |||
| 56909742bc | |||
| bbf4b0646e | |||
| 9f4343cc53 | |||
| a5998cffca |
Generated
+1
-1
@@ -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>"</identifier-quote-string>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
include_once 'php/controller/profile-controller.php';
|
||||
|
||||
$user = $user ?? null;
|
||||
$isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
|
||||
|
||||
<!-- Mobile navbar mit Burger-Symbol -->
|
||||
<input type="checkbox" id="nav-toggle" class="nav__checkbox">
|
||||
<label for="nav-toggle" id="mobile-nav">
|
||||
<label for="nav-toggle" class="mobile-nav">
|
||||
<span>☰</span>
|
||||
</label>
|
||||
|
||||
@@ -151,7 +151,7 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
|
||||
</a>
|
||||
|
||||
<div class="nav__search">
|
||||
<?php include_once 'search.php'; ?>
|
||||
<?php include_once __DIR__ . '/search.php'; ?>
|
||||
</div>
|
||||
|
||||
<a href="index.php?pfad=createArticle" class="nav__item nav__button">
|
||||
@@ -165,7 +165,7 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
|
||||
<?php else: ?>
|
||||
|
||||
<div class="nav__search">
|
||||
<?php include_once 'search.php'; ?>
|
||||
<?php include_once __DIR__ . '/search.php'; ?>
|
||||
</div>
|
||||
|
||||
<a href="index.php?pfad=login" class="nav__item nav__button">
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
include_once "includes/csrf.php";
|
||||
include_once "php/controller/index-controller.php";
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user