mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 18:59: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
|
* Routes loading
|
||||||
*/
|
*/
|
||||||
$dispatcher = FastRoute\cachedDispatcher(function (FastRoute\RouteCollector $r) {
|
$dispatcher = FastRoute\cachedDispatcher(function (FastRoute\RouteCollector $r) {
|
||||||
$routes = require SYSTEM . 'routes.php';
|
|
||||||
|
|
||||||
$routesFinal = [];
|
$routesFinal = [];
|
||||||
foreach(getDatabasePages() as $page) {
|
foreach(getDatabasePages() as $page) {
|
||||||
$routesFinal[] = ['*', $page, '__database__/' . $page, 100];
|
$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) {
|
foreach ($routes as $route) {
|
||||||
if (!str_contains($route[2], '__redirect__') && !str_contains($route[2], '__database__')) {
|
if (!str_contains($route[2], '__redirect__') && !str_contains($route[2], '__database__')) {
|
||||||
if (!is_file(BASE . 'system/pages/' . $route[2])) {
|
if (!is_file(BASE . 'system/pages/' . $route[2])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user