Prechádzať zdrojové kódy

fixed bug in route - update bocian

Piotr Labudda 8 rokov pred
rodič
commit
d9775f373c
2 zmenil súbory, kde vykonal 4 pridanie a 3 odobranie
  1. 1 1
      SE/projects/bocian
  2. 3 2
      SE/se-lib/Router.php

+ 1 - 1
SE/projects/bocian

@@ -1 +1 @@
-Subproject commit 67c3ef450f6d99fe2632650cd2db6dd735230c0a
+Subproject commit dc44d29de89c74355e3a1407831628ecbdc94ebf

+ 3 - 2
SE/se-lib/Router.php

@@ -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);