clear_cache & maintenance csrf

This commit is contained in:
slawkens
2023-11-11 08:27:48 +01:00
parent 08a19158b3
commit 4e87e7e9dc
3 changed files with 19 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ $title = 'Dashboard';
csrfProtect();
if (isset($_GET['clear_cache'])) {
if (isset($_POST['clear_cache'])) {
if (clearCache()) {
success('Cache cleared.');
} else {
@@ -20,7 +20,7 @@ if (isset($_GET['clear_cache'])) {
}
}
if (isset($_GET['maintenance'])) {
if (isset($_POST['maintenance'])) {
$message = (!empty($_POST['message']) ? $_POST['message'] : null);
$_status = (isset($_POST['status']) && $_POST['status'] == 'true');
$_status = ($_status ? '0' : '1');