From 2ed53291d6eb607fa67ec0a61e9a7a4abc6087d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Fri, 2 Feb 2024 00:44:07 +0100 Subject: [PATCH] fix logic --- lib/navigation.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/navigation.php b/lib/navigation.php index d8a5d21..0d03292 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -20,6 +20,10 @@ function generateNavigation(): string $site_name = str_replace("_", " ", $site_dir); if ($site_name == "global") { $site_name = "misc"; + $site_subdomain = $routerConfig["default_site"]; + } + else{ + $site_subdomain = $site_dir; } if ($site_name == "smp") { @@ -28,7 +32,7 @@ function generateNavigation(): string $site_name = ucfirst($site_name); } - $site_location = $routerConfig["protocol"] . $site_dir . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $routerConfig["default_page"]; + $site_location = $routerConfig["protocol"] . $site_subdomain . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $routerConfig["default_page"]; if ($routerRequest["subdomain"] == $site_dir) { //this is the current page