This commit is contained in:
NOrtmann1
2026-06-09 19:06:30 +02:00
parent 8cbd442371
commit 53865efc78
2 changed files with 3 additions and 4 deletions
+3
View File
@@ -71,6 +71,7 @@ include_once 'php/controller/showArticle-controller.php';
if (isset($title) && !empty($title)){echo htmlspecialchars($title); if (isset($title) && !empty($title)){echo htmlspecialchars($title);
}elseif (isset($_SESSION['old_title']) && !empty($_SESSION['old_title'])){ }elseif (isset($_SESSION['old_title']) && !empty($_SESSION['old_title'])){
echo htmlspecialchars($_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); if (isset($content) && !empty($content)){echo htmlspecialchars($content);
}elseif (isset($_SESSION['old_content']) && !empty($_SESSION['old_content'])){ }elseif (isset($_SESSION['old_content']) && !empty($_SESSION['old_content'])){
echo htmlspecialchars($_SESSION['old_content']); echo htmlspecialchars($_SESSION['old_content']);
unset($_SESSION['old_content']);
} }
?> ?>
</textarea> </textarea>
@@ -144,6 +146,7 @@ include_once 'php/controller/showArticle-controller.php';
if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags); if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags);
} elseif (isset($_SESSION['old_tags']) && !empty($_SESSION['old_tags'])){ } elseif (isset($_SESSION['old_tags']) && !empty($_SESSION['old_tags'])){
echo htmlspecialchars($_SESSION['old_tags']); echo htmlspecialchars($_SESSION['old_tags']);
unset($_SESSION['old_tags']);
} }
?>" ?>"
placeholder="z.B. Technik, IT (mit Komma trennen)"> placeholder="z.B. Technik, IT (mit Komma trennen)">
@@ -87,10 +87,6 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
exit(); exit();
} }
$_SESSION["message"] = "article_updated"; $_SESSION["message"] = "article_updated";
unset($_SESSION['old_title']);
unset($_SESSION['old_content']);
unset($_SESSION['old_category']);
unset($_SESSION['old_tags']);
// Weiterleitung zur Homepage // Weiterleitung zur Homepage
header("location: ../../index.php?pfad=showArticle&id=$id"); header("location: ../../index.php?pfad=showArticle&id=$id");
} }