diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-11-11 18:37:36 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-11-11 18:37:36 +0100 |
commit | 45903fe3960b65d63f70188640630c895dbbe222 (patch) | |
tree | ba0b0f9ba0615cd46214eeab236031c062664d6d /app/class/routes.php | |
parent | d7f3313ff4514e38c9f53439cd1a1287e56e45f7 (diff) | |
download | wcms-45903fe3960b65d63f70188640630c895dbbe222.tar.gz wcms-45903fe3960b65d63f70188640630c895dbbe222.zip |
cleaning
Diffstat (limited to 'app/class/routes.php')
-rw-r--r-- | app/class/routes.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/class/routes.php b/app/class/routes.php index 6f37b93..f24492b 100644 --- a/app/class/routes.php +++ b/app/class/routes.php @@ -1,5 +1,6 @@ <?php + class Routes { /** @@ -8,11 +9,10 @@ class Routes public function match() { $router = new AltoRouter(); + $router->setBasePath(Config::basepath()); $router->addRoutes([ ['GET|POST', '/', 'Backrouter#run', 'backrouter'], ['GET', '/[a:art]/', 'Controllerart#read', 'artread/'], - ['GET', '/[a:art]', 'Controllerart#read', 'artread'], - ['GET', '/[a:art]/edit', 'Controllerart#edit', 'artedit'], ['GET', '/[a:art]/edit/', 'Controllerart#edit', 'artedit/'], ]); @@ -22,7 +22,7 @@ class Routes $controllerName = $callableParts[0]; $methodName = $callableParts[1]; - $controller = new $controllerName(); + $controller = new $controllerName($router); call_user_func_array(array($controller, $methodName), $match['params']); } |