From ee20b77602ba157dd98b3468dc42b0eb68f8472f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 6 Feb 2024 20:02:29 +0100 Subject: [PATCH] Fix logout redirect --- assets/script.js | 2 +- lib/page.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/script.js b/assets/script.js index ca32b4d..b435690 100644 --- a/assets/script.js +++ b/assets/script.js @@ -213,7 +213,7 @@ function logout() { doAction('/account', data, "Logout Successful!", "Logout failed.").then(() => { refreshNavbar(); - navigateTo("", localStorage.getItem("defaultPage")); + navigateTo(localStorage.getItem("defaultSite"), localStorage.getItem("defaultPage")); umami.track("logout"); }); } diff --git a/lib/page.php b/lib/page.php index e87139a..773c959 100644 --- a/lib/page.php +++ b/lib/page.php @@ -141,6 +141,7 @@ function getPage($site_name_in = null, $page_name_in = null): string "currentSite" => $site_name, "currentTitle" => $page_title, "defaultPage" => $routerConfig["default_page"], + "defaultSite" => $routerConfig["default_site"], ]); $navigation = generateNavigation();