fix logic

This commit is contained in:
Bruno Rybársky 2024-02-02 00:44:07 +01:00
parent dd590ef492
commit 2ed53291d6

@ -20,6 +20,10 @@ function generateNavigation(): string
$site_name = str_replace("_", " ", $site_dir); $site_name = str_replace("_", " ", $site_dir);
if ($site_name == "global") { if ($site_name == "global") {
$site_name = "misc"; $site_name = "misc";
$site_subdomain = $routerConfig["default_site"];
}
else{
$site_subdomain = $site_dir;
} }
if ($site_name == "smp") { if ($site_name == "smp") {
@ -28,7 +32,7 @@ function generateNavigation(): string
$site_name = ucfirst($site_name); $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) { if ($routerRequest["subdomain"] == $site_dir) {
//this is the current page //this is the current page