debug print
This commit is contained in:
parent
2fe817e4c1
commit
01e0d34d42
@ -40,7 +40,7 @@ function generateNavigation(): string
|
|||||||
}
|
}
|
||||||
|
|
||||||
$navpages = "";
|
$navpages = "";
|
||||||
print_r($pages_dir);
|
|
||||||
foreach ($pages_dir as $page_file) {
|
foreach ($pages_dir as $page_file) {
|
||||||
$page_dir_tmp = explode(".", $page_file);
|
$page_dir_tmp = explode(".", $page_file);
|
||||||
$page_dir = $page_dir_tmp[0];
|
$page_dir = $page_dir_tmp[0];
|
||||||
@ -54,10 +54,12 @@ function generateNavigation(): string
|
|||||||
$page_name = str_replace("_", " ", $page_dir);
|
$page_name = str_replace("_", " ", $page_dir);
|
||||||
$page_name = explode(".", $page_name)[0];
|
$page_name = explode(".", $page_name)[0];
|
||||||
$page_name = ucfirst($page_name);
|
$page_name = ucfirst($page_name);
|
||||||
$page_file = $routerConfig["page_dir"] . $site_dir . "/" . $page_file ;
|
$page_file_path = $routerConfig["page_dir"] . $site_dir . "/" . $page_file ;
|
||||||
|
|
||||||
|
print_r($page_file_path);
|
||||||
|
print_r($page_dir_tmp);
|
||||||
if($page_dir_tmp[1] == "html"){
|
if($page_dir_tmp[1] == "html"){
|
||||||
$page_tmp = file_get_contents($page_file);
|
$page_tmp = file_get_contents($page_file_path);
|
||||||
|
|
||||||
$pageMetadata = parsePageTag($page_tmp);
|
$pageMetadata = parsePageTag($page_tmp);
|
||||||
if(!empty($pageMetadata["parameters"]["minimal_permission_level"])){
|
if(!empty($pageMetadata["parameters"]["minimal_permission_level"])){
|
||||||
@ -68,7 +70,7 @@ function generateNavigation(): string
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($page_dir_tmp[1] == "php"){
|
elseif($page_dir_tmp[1] == "php"){
|
||||||
$page_required_permission = getDynamicPermission($page_file);
|
$page_required_permission = getDynamicPermission($page_file_path);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$page_required_permission = $routerConfig["default_page_permission_level"];
|
$page_required_permission = $routerConfig["default_page_permission_level"];
|
||||||
|
Loading…
Reference in New Issue
Block a user