diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-11-11 22:04:49 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-11-11 22:04:49 +0100 |
commit | a64af357ff41a61f5248e2052274315b390e979c (patch) | |
tree | f08323727b1b2a1fc86f8290777cf847f9604334 /app/class/routes.php | |
parent | cea923a1e82a7e8ce696418c3a5a0f7703871101 (diff) | |
download | wcms-a64af357ff41a61f5248e2052274315b390e979c.tar.gz wcms-a64af357ff41a61f5248e2052274315b390e979c.zip |
clean
Diffstat (limited to 'app/class/routes.php')
-rw-r--r-- | app/class/routes.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/class/routes.php b/app/class/routes.php index bd9fd71..89f82e6 100644 --- a/app/class/routes.php +++ b/app/class/routes.php @@ -9,11 +9,19 @@ class Routes public function match() { $router = new AltoRouter(); - $router->setBasePath('/' . Config::basepath()); + if(!empty(Config::basepath())) { + $router->setBasePath(DIRECTORY_SEPARATOR . Config::basepath()); + } $router->addRoutes([ ['GET|POST', '/', 'Backrouter#run', 'backrouter'], ['GET', '/[a:art]/', 'Controllerart#read', 'artread/'], - ['GET', '/[a:art]/edit/', 'Controllerart#edit', 'artedit/'], + ['GET', '/[a:art]', 'Controllerart#read', 'artread'], + ['GET', '/[a:art]/add', 'Controllerart#add', 'artadd'], + ['GET', '/[a:art]/edit', 'Controllerart#edit', 'artedit'], + ['GET', '/[a:art]/log', 'Controllerart#log', 'artlog'], + ['POST', '/[a:art]/edit', 'Controllerart#update', 'artupdate'], + ['GET', '/[a:art]/delete', 'Controllerart#confirmdelete', 'artconfirmdelete'], + ['POST', '/[a:art]/delete', 'Controllerart#delete', 'artdelete'], ]); $match = $router->match(); |