many updates

This commit is contained in:
Paul Spenke
2023-08-20 23:45:24 +08:00
parent 726d691054
commit 267d8004e0
15 changed files with 173 additions and 39 deletions
+10 -7
View File
@@ -423,6 +423,13 @@ class Plugi
exit();
}
if(Extensions::getRoute(phpb_current_relative_url(true))){
$ext = include Extensions::getRoutes()[phpb_current_relative_url(true)];
if($ext !== 'continue'){
return true;
}
}
// try to find page in cache
$cache = phpb_instance('cache');
if (phpb_config('cache.enabled') &&
@@ -438,13 +445,6 @@ class Plugi
}
}
if(Extensions::getRoute(phpb_current_relative_url())){
$ext = include Extensions::getRoutes()[phpb_current_relative_url()];
if($ext !== 'continue'){
return true;
}
}
// let the page router resolve the current URL
$page = null;
$pageTranslation = $this->resolvePageLanguageVariantFromUrl(phpb_current_relative_url());
@@ -465,6 +465,9 @@ class Plugi
}
// render page if resolved
if ($page) {
if ($page->get('type') === 'redirect') {
phpb_redirect($pageTranslation->target);
}
// TODO add menu etc
$renderedContent = $this->pageBuilder->renderPage($page, $pageTranslation->locale);
if (!str_contains($pageTranslation->route, '/*')) {