Convert dynamic page metadata to variable
This commit is contained in:
parent
6ccbe82189
commit
8a0b5e3e3a
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user