diff options
Diffstat (limited to 'src/web/core/router.php')
-rw-r--r-- | src/web/core/router.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/core/router.php b/src/web/core/router.php index 2cda384..a1307cf 100644 --- a/src/web/core/router.php +++ b/src/web/core/router.php @@ -30,7 +30,8 @@ class Router extends Component { $path = substr($path, 1); // get modified route - foreach ($GLOBALS['routes'] as $key => $value) { + $routes = CONFIG['routes']; + foreach ($routes as $key => $value) { $key = "/^{$key}$/"; if (!preg_match($key, $path, $matches)) continue; @@ -83,7 +84,6 @@ class Router extends Component { 'args' => array_slice($parts, 2), ); - $routes = $GLOBALS['routes']; if (isset($routes[$path])) { $parts = explode('/', $routes[$path]); if (count($parts) == 1) { |