From 52e1ce0b2034583f03157be593dcdc9a86d8d2ee Mon Sep 17 00:00:00 2001 From: Edwin Noorlander Date: Tue, 21 Jul 2026 12:45:58 +0200 Subject: [PATCH] Fix admin form actions and redirects: replace & with ? for query parameters --- admin/templates/pages/content-dir-form.php | 2 +- admin/templates/pages/content-edit.php | 4 ++-- admin/templates/pages/content-move-form.php | 2 +- admin/templates/pages/content-new.php | 4 ++-- admin/templates/pages/content.php | 24 ++++++++++----------- admin/templates/pages/plugins-edit.php | 2 +- admin/templates/pages/plugins.php | 8 +++---- admin/templates/pages/theme.php | 2 +- public/admin.php | 14 ++++++------ 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/admin/templates/pages/content-dir-form.php b/admin/templates/pages/content-dir-form.php index 5c098d1..35b0c82 100644 --- a/admin/templates/pages/content-dir-form.php +++ b/admin/templates/pages/content-dir-form.php @@ -20,7 +20,7 @@ diff --git a/admin/templates/pages/content-edit.php b/admin/templates/pages/content-edit.php index ca71cab..ccea1c8 100644 --- a/admin/templates/pages/content-edit.php +++ b/admin/templates/pages/content-edit.php @@ -2,7 +2,7 @@
-
+
@@ -48,7 +48,7 @@ - Terug + Terug
diff --git a/admin/templates/pages/content-move-form.php b/admin/templates/pages/content-move-form.php index 2ff4cd1..fdc0b78 100644 --- a/admin/templates/pages/content-move-form.php +++ b/admin/templates/pages/content-move-form.php @@ -28,7 +28,7 @@
diff --git a/admin/templates/pages/content-new.php b/admin/templates/pages/content-new.php index fd4cd1b..ed20c6c 100644 --- a/admin/templates/pages/content-new.php +++ b/admin/templates/pages/content-new.php @@ -2,7 +2,7 @@
-
+
@@ -55,7 +55,7 @@ - Terug + Terug
diff --git a/admin/templates/pages/content.php b/admin/templates/pages/content.php index 09667a9..3fe769c 100644 --- a/admin/templates/pages/content.php +++ b/admin/templates/pages/content.php @@ -7,7 +7,7 @@ - + Nieuw bestand
@@ -16,7 +16,7 @@
-
+
@@ -48,7 +48,7 @@ - + @@ -76,11 +76,11 @@ - + - + 'bi-file-text text-primary', @@ -104,26 +104,26 @@ - + - + - + - + - + -
+
- +
-
+
- + Bewerken diff --git a/public/admin.php b/public/admin.php index 02013b3..6560c7b 100644 --- a/public/admin.php +++ b/public/admin.php @@ -405,7 +405,7 @@ function handleContentNew(AdminAuth $auth, array $config): void } file_put_contents($filePath, $content); - header('Location: /admin/content&dir=' . urlencode($dir)); + header('Location: /admin/content?dir=' . urlencode($dir)); exit; } } @@ -454,7 +454,7 @@ function handleContentDelete(AdminAuth $auth, array $config): void } $dir = dirname($file); - header('Location: /admin/content&dir=' . urlencode($dir === '.' ? '' : $dir)); + header('Location: /admin/content?dir=' . urlencode($dir === '.' ? '' : $dir)); exit; } @@ -470,7 +470,7 @@ function handleContentDirCreate(AdminAuth $auth, array $config): void $subdir = str_replace(['../', '..\\'], '', $subdir); if (!$auth->verifyCsrf($_POST['csrf_token'] ?? '')) { - header('Location: /admin/content&dir=' . urlencode($subdir)); + header('Location: /admin/content?dir=' . urlencode($subdir)); exit; } @@ -483,7 +483,7 @@ function handleContentDirCreate(AdminAuth $auth, array $config): void } } - header('Location: /admin/content&dir=' . urlencode($subdir)); + header('Location: /admin/content?dir=' . urlencode($subdir)); exit; } @@ -518,7 +518,7 @@ function handleContentDirRename(AdminAuth $auth, array $config): void } $parentRelative = dirname($dir); - header('Location: /admin/content&dir=' . urlencode($parentRelative === '.' ? '' : $parentRelative)); + header('Location: /admin/content?dir=' . urlencode($parentRelative === '.' ? '' : $parentRelative)); exit; } @@ -560,7 +560,7 @@ function handleContentMove(AdminAuth $auth, array $config): void } $parentRelative = is_file($fullPath) ? dirname($item) : dirname($item); - header('Location: /admin/content&dir=' . urlencode($parentRelative === '.' ? '' : $parentRelative)); + header('Location: /admin/content?dir=' . urlencode($parentRelative === '.' ? '' : $parentRelative)); exit; } @@ -598,7 +598,7 @@ function handleContentDirDelete(AdminAuth $auth, array $config): void } $parentDir = dirname($dir); - header('Location: /admin/content&dir=' . urlencode($parentDir === '.' ? '' : $parentDir)); + header('Location: /admin/content?dir=' . urlencode($parentDir === '.' ? '' : $parentDir)); exit; }