diff --git a/lib/navigation.php b/lib/navigation.php index e271cc1..b62cdce 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -2,7 +2,7 @@ function getDynamicPermission($file): int { include_once($file); - return get_parameters()["minimal_permission_level"]; + return $page_parameters["minimal_permission_level"]; } function generateNavigation(): string diff --git a/pages/home/account.php b/pages/home/account.php index 6dce949..ddafc7f 100644 --- a/pages/home/account.php +++ b/pages/home/account.php @@ -3,10 +3,8 @@ require_once "lib/router.php"; require_once "lib/account.php"; -function get_parameters():array -{ - return ["minimal_permission_level" => 1, "secret" => "no", "page_title" => "Account"]; -} +$page_parameters = ["minimal_permission_level" => 1, "secret" => "no", "page_title" => "Account"]; + function render(): string { diff --git a/pages/home/settings.php b/pages/home/settings.php index 2530638..1921e16 100644 --- a/pages/home/settings.php +++ b/pages/home/settings.php @@ -3,10 +3,7 @@ require_once "lib/router.php"; require_once "lib/account.php"; -function get_parameters():array -{ - return ["minimal_permission_level" => 2, "secret" => "no", "page_title" => "Settings"]; -} +$page_parameters = ["minimal_permission_level" => 2, "secret" => "no", "page_title" => "Settings"]; function render(): string {