diff --git a/system/router.php b/system/router.php index 4f68b127..e0bcc04f 100644 --- a/system/router.php +++ b/system/router.php @@ -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])) {