From 372f42749c5942c159752d861899f4b692fd8c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 16 Jan 2024 21:31:19 +0100 Subject: [PATCH] test --- lib/config.php | 2 ++ lib/navpages.php | 4 ++-- lib/routing.php | 30 +++++++++--------------------- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/lib/config.php b/lib/config.php index 033a4ec..9d02198 100644 --- a/lib/config.php +++ b/lib/config.php @@ -9,4 +9,6 @@ $routerConfig["template_dir"] = "templates/"; $routerConfig["page_dir"] = "pages/"; + + $routerConfig["protocol"] = "https://"; } diff --git a/lib/navpages.php b/lib/navpages.php index 6c19c29..9375143 100644 --- a/lib/navpages.php +++ b/lib/navpages.php @@ -19,7 +19,7 @@ function generateNavigation() } $site_name = ucfirst($site_name); - $site_location = $routerRequest["protocol"] . $site_dir . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $routerConfig["default_page"]; + $site_location = $routerConfig["protocol"] . $site_dir . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $routerConfig["default_page"]; if ($routerRequest["subdomain"] == $site_dir) { //this is the current page @@ -37,7 +37,7 @@ function generateNavigation() $page_class = "class=\"navpage_link active\""; } - $page_location = $routerRequest["protocol"] . $site_dir . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $page_dir; + $page_location = $routerConfig["protocol"] . $site_dir . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $page_dir; $page_name = str_replace("_", " ", $page_dir); $page_name = explode(".", $page_name)[0]; diff --git a/lib/routing.php b/lib/routing.php index fd6b09b..cdbb1bb 100644 --- a/lib/routing.php +++ b/lib/routing.php @@ -1,19 +1,10 @@