1
0
mirror of https://github.com/dannyvankooten/AltoRouter.git synced 2025-08-05 16:07:32 +02:00

Merge pull request #20 from Adduc/patch-7

Don't add base path when route is '*' , fixes #18 . Thank you @Adduc !
This commit is contained in:
Danny van Kooten
2013-09-12 12:04:58 -07:00

View File

@@ -25,7 +25,9 @@ class AltoRouter {
*/
public function map($method, $route, $target, $name = null) {
$route = $this->basePath . $route;
if($route != '*') {
$route = $this->basePath . $route;
}
$this->routes[] = array($method, $route, $target, $name);