From 4867edf63049f1851ece4d7556b94e6a22ce0f93 Mon Sep 17 00:00:00 2001 From: AkisYTB3 Date: Wed, 17 Jan 2024 11:06:02 +0100 Subject: [PATCH] more php testing --- lib/navpages.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/navpages.php b/lib/navpages.php index 2ef35e7..9664e79 100644 --- a/lib/navpages.php +++ b/lib/navpages.php @@ -17,7 +17,12 @@ function generateNavigation() $site_name = "misc"; $site_dir = $routerConfig["default_site"]; } - $site_name = ucfirst($site_name); + + if ($site_name == "smp") { + $site_name = "SMP" + } else{ + $site_name = ucfirst($site_name); + } $site_location = $routerConfig["protocol"] . $site_dir . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $routerConfig["default_page"]; @@ -41,11 +46,7 @@ function generateNavigation() $page_name = str_replace("_", " ", $page_dir); $page_name = explode(".", $page_name)[0]; - if ($page_name == "smp") { - $page_name = "SMP"; - } else { - $page_name = ucfirst($page_name); - } + $page_name = ucfirst($page_name); $navpages .= ""; }