diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 7f086d81a..73fac94bb 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -23,7 +23,6 @@ use ProcessMaker\Validation\ValidationUploadedFiles; class WebApplication { const RUNNING_DEFAULT = "default.running"; - const RUNNING_INDEX = "index.running"; const RUNNING_WORKFLOW = "workflow.running"; const RUNNING_API = "api.running"; const RUNNING_OAUTH2 = "api.oauth2"; @@ -113,13 +112,7 @@ class WebApplication */ public function route() { - if ($this->requestUri === "/") { - if (file_exists("index.html")) { - return self::RUNNING_INDEX; - } else { - return self::RUNNING_DEFAULT; - } - } elseif ($this->requestUri !== "/api/oauth2/token" && + if ($this->requestUri !== "/api/oauth2/token" && substr($this->requestUri, 1, 3) === "api" && count(explode("/", $this->requestUri)) >= 4 // url api pattern: /api/1.0// ) { @@ -252,7 +245,7 @@ class WebApplication $serverAddr = $_SERVER ['SERVER_ADDR']; $endTime = microtime(true); $time = $endTime - $startingTime; - + Bootstrap::verifyPath(PATH_DATA . 'logs', true); $fpt = fopen(PATH_DATA . 'logs/api.log', 'a'); fwrite($fpt, sprintf("%s %7.6f %-15s %-4s %s\n", date('Y-m-d H:i:s'), $time, getenv('REMOTE_ADDR'), $_SERVER ['REQUEST_METHOD'], $_SERVER ['REQUEST_URI'])); diff --git a/workflow/public_html/app.php b/workflow/public_html/app.php index db2bef174..f152901ad 100644 --- a/workflow/public_html/app.php +++ b/workflow/public_html/app.php @@ -1,6 +1,4 @@ run(WebApplication::SERVICE_OAUTH2); break; - // todo: remove in next iterations - //case WebApplication::RUNNING_INDEX: - // $response = new Response(file_get_contents("index.html"), 302); - // $response->send(); - break; - case WebApplication::RUNNING_DEFAULT: $response = new Response("", 302); //TODO compose this def url with configuration data from env.ini @@ -73,4 +65,3 @@ try { $response = new Response($view->getOutput(), 503); $response->send(); } - diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 5cbb11516..9705b0169 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -98,7 +98,6 @@ if (file_exists(FILE_PATHS_INSTALLED)) { Bootstrap::verifyPath(PATH_SMARTY_C, true); Bootstrap::verifyPath(PATH_SMARTY_CACHE, true); } - // set include path set_include_path( PATH_CORE . PATH_SEPARATOR .