mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 01:09:21 +02:00
Update router.php
This commit is contained in:
parent
c2bf94fb23
commit
b71555d60d
@ -89,8 +89,6 @@ if($logged && $account_logged && $account_logged->isLoaded()) {
|
||||
* Routes loading
|
||||
*/
|
||||
$dispatcher = FastRoute\cachedDispatcher(function (FastRoute\RouteCollector $r) {
|
||||
$routes = require SYSTEM . 'routes.php';
|
||||
|
||||
$routesFinal = [];
|
||||
foreach(getDatabasePages() as $page) {
|
||||
$routesFinal[] = ['*', $page, '__database__/' . $page, 100];
|
||||
@ -106,6 +104,7 @@ $dispatcher = FastRoute\cachedDispatcher(function (FastRoute\RouteCollector $r)
|
||||
*/
|
||||
}
|
||||
|
||||
$routes = require SYSTEM . 'routes.php';
|
||||
foreach ($routes as $route) {
|
||||
if (!str_contains($route[2], '__redirect__') && !str_contains($route[2], '__database__')) {
|
||||
if (!is_file(BASE . 'system/pages/' . $route[2])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user