From bb7c85d770791f8e7bcd98343992d2fe270e2101 Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Tue, 9 Jun 2026 18:49:07 +0200
Subject: [PATCH 01/11] .idea
---
.idea/dataSources/data_sources_history.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.idea/dataSources/data_sources_history.xml b/.idea/dataSources/data_sources_history.xml
index b45f982..3f0c640 100644
--- a/.idea/dataSources/data_sources_history.xml
+++ b/.idea/dataSources/data_sources_history.xml
@@ -19,7 +19,7 @@
$ProjectFileDir$
-
+
"
From aaff15ee8c6effc09801fb48ee091fb5bbd663fb Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Tue, 9 Jun 2026 18:49:14 +0200
Subject: [PATCH 02/11] Update updateArticle-controller.php
---
php/controller/updateArticle-controller.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/php/controller/updateArticle-controller.php b/php/controller/updateArticle-controller.php
index d5ccc77..8e54b87 100644
--- a/php/controller/updateArticle-controller.php
+++ b/php/controller/updateArticle-controller.php
@@ -83,7 +83,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
$articleManager->updateArticle($id ,$article, $author);
} catch (Exception $e){
$_SESSION["message"] = $e->getMessage();
- header("location: ../../index.php?pfad=updateArticle");
+ header("location: ../../index.php?pfad=updateArticle=$id");
exit();
}
$_SESSION["message"] = "article_updated";
From ede8e1cb2180fae9a0e7738df800c7ba8f182b51 Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Tue, 9 Jun 2026 18:55:09 +0200
Subject: [PATCH 03/11] Fehlermeldungsweiterleitung setzt nun die id
---
php/controller/updateArticle-controller.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/php/controller/updateArticle-controller.php b/php/controller/updateArticle-controller.php
index 8e54b87..16fa90f 100644
--- a/php/controller/updateArticle-controller.php
+++ b/php/controller/updateArticle-controller.php
@@ -33,31 +33,31 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
// -------------------------------- Validierung der Daten: -------------------------
if (!articleAuthorValidator($author)) {
$_SESSION["message"] = "author_not_valid";
- header("location: ../../index.php?pfad=updateArticle");
+ header("location: ../../index.php?pfad=updateArticle&id=$id");
exit();
}
if (!articleTitleValidator($title)) {
$_SESSION["message"] = "invalid_title";
- header("location: ../../index.php?pfad=updateArticle");
+ header("location: ../../index.php?pfad=updateArticle&id=$id");
exit();
}
if (!articleContentValidator($content)) {
$_SESSION["message"] = "invalid_content";
- header("location: ../../index.php?pfad=updateArticle");
+ header("location: ../../index.php?pfad=updateArticle&id=$id");
exit();
}
if (!articleCategoryValidator($category)) {
$_SESSION["message"] = "invalid_category";
- header("location: ../../index.php?pfad=updateArticle");
+ header("location: ../../index.php?pfad=updateArticle&id=$id");
exit();
}
if (!articleTagValidator($tags)) {
$_SESSION["message"] = "invalid_tags";
- header("location: ../../index.php?pfad=updateArticle");
+ header("location: ../../index.php?pfad=updateArticle&id=$id");
exit();
} else {
$cleanedTags = [];
@@ -83,7 +83,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
$articleManager->updateArticle($id ,$article, $author);
} catch (Exception $e){
$_SESSION["message"] = $e->getMessage();
- header("location: ../../index.php?pfad=updateArticle=$id");
+ header("location: ../../index.php?pfad=updateArticle&id=$id");
exit();
}
$_SESSION["message"] = "article_updated";
From f54cf58dc2325afabf01902725c3152b06d57090 Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Tue, 9 Jun 2026 18:57:26 +0200
Subject: [PATCH 04/11] Update updateArticle-controller.php
---
php/controller/updateArticle-controller.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/php/controller/updateArticle-controller.php b/php/controller/updateArticle-controller.php
index 16fa90f..0e0bfd1 100644
--- a/php/controller/updateArticle-controller.php
+++ b/php/controller/updateArticle-controller.php
@@ -21,7 +21,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
if (!isset($_POST["title"]) ||!isset($_POST["content"]) || !isset($_POST["category"])){
$_SESSION["message"] = "missing_parameters";
- header("location: ../../index.php?pfad=updateArticle");
+ header("location: ../../index.php?pfad=updateArticle&id=$id");
exit();
}else{
$title = $_POST["title"];
From 8cbd4423713e347017afec21b69d8d9bbda07e62 Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Tue, 9 Jun 2026 19:05:04 +0200
Subject: [PATCH 05/11] unset der Eingaben verschoben
---
content/updateArticle.php | 3 ---
php/controller/updateArticle-controller.php | 4 ++++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/content/updateArticle.php b/content/updateArticle.php
index 36f6a67..6591680 100644
--- a/content/updateArticle.php
+++ b/content/updateArticle.php
@@ -71,7 +71,6 @@ include_once 'php/controller/showArticle-controller.php';
if (isset($title) && !empty($title)){echo htmlspecialchars($title);
}elseif (isset($_SESSION['old_title']) && !empty($_SESSION['old_title'])){
echo htmlspecialchars($_SESSION['old_title']);
- unset($_SESSION['old_title']);
}
?>"
@@ -81,7 +80,6 @@ include_once 'php/controller/showArticle-controller.php';
if (isset($content) && !empty($content)){echo htmlspecialchars($content);
}elseif (isset($_SESSION['old_content']) && !empty($_SESSION['old_content'])){
echo htmlspecialchars($_SESSION['old_content']);
- unset($_SESSION['old_content']);
}
?>
@@ -146,7 +144,6 @@ include_once 'php/controller/showArticle-controller.php';
if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags);
} elseif (isset($_SESSION['old_tags']) && !empty($_SESSION['old_tags'])){
echo htmlspecialchars($_SESSION['old_tags']);
- unset($_SESSION['old_tags']);
}
?>"
placeholder="z.B. Technik, IT (mit Komma trennen)">
diff --git a/php/controller/updateArticle-controller.php b/php/controller/updateArticle-controller.php
index 0e0bfd1..4c81091 100644
--- a/php/controller/updateArticle-controller.php
+++ b/php/controller/updateArticle-controller.php
@@ -87,6 +87,10 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
exit();
}
$_SESSION["message"] = "article_updated";
+ unset($_SESSION['old_title']);
+ unset($_SESSION['old_content']);
+ unset($_SESSION['old_category']);
+ unset($_SESSION['old_tags']);
// Weiterleitung zur Homepage
header("location: ../../index.php?pfad=showArticle&id=$id");
}
From 53865efc78fa9ebe147483e600739d479cb0a77d Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Tue, 9 Jun 2026 19:06:30 +0200
Subject: [PATCH 06/11] redo
---
content/updateArticle.php | 3 +++
php/controller/updateArticle-controller.php | 4 ----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/content/updateArticle.php b/content/updateArticle.php
index 6591680..36f6a67 100644
--- a/content/updateArticle.php
+++ b/content/updateArticle.php
@@ -71,6 +71,7 @@ include_once 'php/controller/showArticle-controller.php';
if (isset($title) && !empty($title)){echo htmlspecialchars($title);
}elseif (isset($_SESSION['old_title']) && !empty($_SESSION['old_title'])){
echo htmlspecialchars($_SESSION['old_title']);
+ unset($_SESSION['old_title']);
}
?>"
@@ -80,6 +81,7 @@ include_once 'php/controller/showArticle-controller.php';
if (isset($content) && !empty($content)){echo htmlspecialchars($content);
}elseif (isset($_SESSION['old_content']) && !empty($_SESSION['old_content'])){
echo htmlspecialchars($_SESSION['old_content']);
+ unset($_SESSION['old_content']);
}
?>
@@ -144,6 +146,7 @@ include_once 'php/controller/showArticle-controller.php';
if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags);
} elseif (isset($_SESSION['old_tags']) && !empty($_SESSION['old_tags'])){
echo htmlspecialchars($_SESSION['old_tags']);
+ unset($_SESSION['old_tags']);
}
?>"
placeholder="z.B. Technik, IT (mit Komma trennen)">
diff --git a/php/controller/updateArticle-controller.php b/php/controller/updateArticle-controller.php
index 4c81091..0e0bfd1 100644
--- a/php/controller/updateArticle-controller.php
+++ b/php/controller/updateArticle-controller.php
@@ -87,10 +87,6 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
exit();
}
$_SESSION["message"] = "article_updated";
- unset($_SESSION['old_title']);
- unset($_SESSION['old_content']);
- unset($_SESSION['old_category']);
- unset($_SESSION['old_tags']);
// Weiterleitung zur Homepage
header("location: ../../index.php?pfad=showArticle&id=$id");
}
From d5fdc9383f6205cf642875ae18c9fcd1fe090d8c Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Wed, 10 Jun 2026 15:52:12 +0200
Subject: [PATCH 07/11] Update updateArticle.php
---
content/updateArticle.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/content/updateArticle.php b/content/updateArticle.php
index 36f6a67..3916e70 100644
--- a/content/updateArticle.php
+++ b/content/updateArticle.php
@@ -68,10 +68,11 @@ include_once 'php/controller/showArticle-controller.php';
?>
Date: Wed, 10 Jun 2026 15:54:12 +0200
Subject: [PATCH 08/11] Update updateArticle.php
---
content/updateArticle.php | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/content/updateArticle.php b/content/updateArticle.php
index 3916e70..83da9e9 100644
--- a/content/updateArticle.php
+++ b/content/updateArticle.php
@@ -79,10 +79,11 @@ include_once 'php/controller/showArticle-controller.php';
placeholder="Titel hier eingeben" required>
@@ -144,10 +145,11 @@ include_once 'php/controller/showArticle-controller.php';
From 7e2b29bfb0f34ff822b6e97ee75bcaedd3d12279 Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Wed, 10 Jun 2026 16:00:01 +0200
Subject: [PATCH 09/11] Update updateArticle.php
---
content/updateArticle.php | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/content/updateArticle.php b/content/updateArticle.php
index 83da9e9..f5cefec 100644
--- a/content/updateArticle.php
+++ b/content/updateArticle.php
@@ -78,14 +78,7 @@ include_once 'php/controller/showArticle-controller.php';
?>"
placeholder="Titel hier eingeben" required>
From 90c6f67c2481bb0642f2af42b33a08a93ee52162 Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Wed, 10 Jun 2026 16:04:06 +0200
Subject: [PATCH 10/11] Update updateArticle.php
---
content/updateArticle.php | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/content/updateArticle.php b/content/updateArticle.php
index f5cefec..aa260b5 100644
--- a/content/updateArticle.php
+++ b/content/updateArticle.php
@@ -77,9 +77,8 @@ include_once 'php/controller/showArticle-controller.php';
?>"
placeholder="Titel hier eingeben" required>
-
+
+
From 23321f90c267903c5bdf4b0f0f23da0deb199b50 Mon Sep 17 00:00:00 2001
From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com>
Date: Wed, 10 Jun 2026 16:05:07 +0200
Subject: [PATCH 11/11] Update createArticle.php
---
content/createArticle.php | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/content/createArticle.php b/content/createArticle.php
index db52c4d..a1a2d20 100644
--- a/content/createArticle.php
+++ b/content/createArticle.php
@@ -53,9 +53,8 @@ if (!isset($_SESSION["user"])) {
-
+
+