From 71f62f0e9c070f23789bac66950a149bfec1507c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Sat, 3 Feb 2024 16:24:48 +0100 Subject: [PATCH] Convert return type of dynamic pages --- lib/navigation.php | 3 +-- lib/page.php | 5 +---- pages/home/account.php | 4 +++- pages/home/settings.php | 4 +++- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/navigation.php b/lib/navigation.php index b62cdce..958d66c 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -1,8 +1,7 @@ $page_content, "parameters" => $page_parameters]; + return require_once $page_file; } function parsePageTag($input): array diff --git a/pages/home/account.php b/pages/home/account.php index ddafc7f..bac7531 100644 --- a/pages/home/account.php +++ b/pages/home/account.php @@ -19,4 +19,6 @@ function render(): string } return ob_get_clean(); -} \ No newline at end of file +} + +return render(); \ No newline at end of file diff --git a/pages/home/settings.php b/pages/home/settings.php index 1921e16..a346df1 100644 --- a/pages/home/settings.php +++ b/pages/home/settings.php @@ -18,4 +18,6 @@ function render(): string } return ob_get_clean(); -} \ No newline at end of file +} + +return ["output" => render(), "parameters" => $page_parameters]; \ No newline at end of file