test
This commit is contained in:
@@ -38,6 +38,22 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
"password" => $password
|
||||
];
|
||||
|
||||
if (!is_dir("data/mails") && !mkdir("data/mails", 0777, true)) {
|
||||
throw new RuntimeException("Ordner data/mails konnte nicht erstellt werden.");
|
||||
}
|
||||
|
||||
if (!is_dir("data/pending") && !mkdir("data/pending", 0777, true)) {
|
||||
throw new RuntimeException("Ordner data/pending konnte nicht erstellt werden.");
|
||||
}
|
||||
|
||||
if (!is_writable("data/mails")) {
|
||||
throw new RuntimeException("Ordner data/mails ist nicht beschreibbar.");
|
||||
}
|
||||
|
||||
if (!is_writable("data/pending")) {
|
||||
throw new RuntimeException("Ordner data/pending ist nicht beschreibbar.");
|
||||
}
|
||||
|
||||
file_put_contents(
|
||||
"data/pending/" . $token . ".json",
|
||||
json_encode($pendingData, JSON_PRETTY_PRINT)
|
||||
@@ -71,7 +87,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
<a href="index.php?pfad=show-mail&token=' . htmlspecialchars($token) . '" target="_blank">xy</a>.';
|
||||
|
||||
} catch (Exception $e) {
|
||||
$error = "Die Registrierung konnte nicht verarbeitet werden.";
|
||||
$error = $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user