dev auf main #68

Open
niklas.ortmann wants to merge 1044 commits from devNachCSRF into main
Showing only changes of commit 560f53cfb6 - Show all commits
+7 -4
View File
@@ -5,14 +5,17 @@ require_once '../model/ArticleManager.php';
require_once '../model/Article.php';
if ($_SERVER["REQUEST_METHOD"] === "POST") {
if(!isset($_POST["title"]) ||!isset($_POST["content"]) || !isset($_POST["category"])){
try {
$id = $_GET["id"];
} catch (Exception $e){
$_SESSION["message"] = "missing_id";
}
if (!isset($_POST["title"]) ||!isset($_POST["content"]) || !isset($_POST["category"])){
$_SESSION["message"] = "missing_parameters";
header("location: ../../index.php?pfad=updateArticle");
exit();
} elseif(!isset($id)) {
$_SESSION["message"] = "missing_id";
header("location: ../../index.php?pfad=updateArticle");
exit();
}else{
$newTitle = $_POST["title"];
@@ -35,9 +38,9 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
$_SESSION["message"] = "article_updated";
// Weiterleitung zur Homepage
header("location: ../../index.php");
exit();
}
exit();
}
?>