|
|
@@ -41,10 +41,11 @@ class Router {
|
|
|
|
|
|
$routeClassName = "Route_{$route}";
|
|
|
if ('UrlAction' === substr($route, 0, strlen('UrlAction'))) { // Use project/{$activeProject}/tools/{$routeName}.php
|
|
|
- $routeClassName = substr($route, strlen('UrlAction') + 1);
|
|
|
+ $routeFileName = substr($route, strlen('UrlAction') + 1);
|
|
|
+ $routeClassName = "RouteTool_{$routeFileName}";
|
|
|
$activeProjectPath = Config::getProjectPath();
|
|
|
if ($activeProjectPath) {
|
|
|
- $toolPath = "{$activeProjectPath}/tools/{$routeClassName}.php";
|
|
|
+ $toolPath = "{$activeProjectPath}/tools/{$routeFileName}.php";
|
|
|
if (file_exists($toolPath)) {
|
|
|
require_once $toolPath;
|
|
|
if (!class_exists($routeClassName)) throw new HttpException("Not found class", 404);
|