From c4f8899fd79bc0b4b0ceaa5c3486cc6831682a09 Mon Sep 17 00:00:00 2001 From: nzxl101 Date: Wed, 18 Sep 2024 13:48:31 +0200 Subject: [PATCH] Fix incorrect currentPage file name --- root/app/www/public/ajax/shared.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/app/www/public/ajax/shared.php b/root/app/www/public/ajax/shared.php index a76d06e..5317391 100644 --- a/root/app/www/public/ajax/shared.php +++ b/root/app/www/public/ajax/shared.php @@ -25,8 +25,8 @@ } } -$ajaxFile = str_replace('/config/www/ajax/', '', debug_backtrace()[0]['file']); -$page = str_replace('.php', '', $ajaxFile); +$ajaxFile = basename(debug_backtrace()[0]['file'], '.php'); +$page = $ajaxFile; if ($page == 'login' && $_SESSION['authenticated']) { $page = 'overview';