From d5f3a1bb59036e28d100b41159af3ca46e116cbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 6 Feb 2024 20:51:44 +0100 Subject: [PATCH] Fix error pages --- lib/page.php | 2 +- templates/403.html | 2 +- templates/404.html | 2 +- templates/500.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/page.php b/lib/page.php index dc7f6fa..f9a380a 100644 --- a/lib/page.php +++ b/lib/page.php @@ -99,7 +99,7 @@ function renderPage($page_name = null, $site_name = null): array else{ $page_tmp = file_get_contents($routerConfig["template_dir"] . "403.html"); $pageMetadata = parsePageTag($page_tmp); - $page = $pageMetadata["output"]; + $page = str_replace("__DEFAULT_LINK__", "/" . $routerConfig["default_site"] . "/" . $routerConfig["default_page"], $pageMetadata["output"]); http_response_code(403); } } diff --git a/templates/403.html b/templates/403.html index 0ff5cdb..e208ec7 100644 --- a/templates/403.html +++ b/templates/403.html @@ -2,5 +2,5 @@

TY KÁR KAM TO DEŠ

403

Našli sme stránku ktorú hľadáš, ale nemáš práva na ňu pristupovať: __TEMPLATE_PAGE_TITLE__.

- SPÄŤ DOMOV + SPÄŤ DOMOV \ No newline at end of file diff --git a/templates/404.html b/templates/404.html index 6b355d6..b488f26 100644 --- a/templates/404.html +++ b/templates/404.html @@ -2,5 +2,5 @@

TY KÁR KAM TO DEŠ

404

Nenašli sme stránku ktorú hľadáš: __TEMPLATE_PAGE_TITLE__.

- SPÄŤ DOMOV + SPÄŤ DOMOV \ No newline at end of file diff --git a/templates/500.html b/templates/500.html index 065835a..7a8643b 100644 --- a/templates/500.html +++ b/templates/500.html @@ -2,5 +2,5 @@

Niekto to pobabral

500

Nejaký neschopný vývojár nevedel robiť túto stránku.

- SPÄŤ DOMOV + SPÄŤ DOMOV \ No newline at end of file