remove RUNNIN_INDEX because always we have index.html
This commit is contained in:
@@ -23,7 +23,6 @@ use ProcessMaker\Validation\ValidationUploadedFiles;
|
|||||||
class WebApplication
|
class WebApplication
|
||||||
{
|
{
|
||||||
const RUNNING_DEFAULT = "default.running";
|
const RUNNING_DEFAULT = "default.running";
|
||||||
const RUNNING_INDEX = "index.running";
|
|
||||||
const RUNNING_WORKFLOW = "workflow.running";
|
const RUNNING_WORKFLOW = "workflow.running";
|
||||||
const RUNNING_API = "api.running";
|
const RUNNING_API = "api.running";
|
||||||
const RUNNING_OAUTH2 = "api.oauth2";
|
const RUNNING_OAUTH2 = "api.oauth2";
|
||||||
@@ -113,13 +112,7 @@ class WebApplication
|
|||||||
*/
|
*/
|
||||||
public function route()
|
public function route()
|
||||||
{
|
{
|
||||||
if ($this->requestUri === "/") {
|
if ($this->requestUri !== "/api/oauth2/token" &&
|
||||||
if (file_exists("index.html")) {
|
|
||||||
return self::RUNNING_INDEX;
|
|
||||||
} else {
|
|
||||||
return self::RUNNING_DEFAULT;
|
|
||||||
}
|
|
||||||
} elseif ($this->requestUri !== "/api/oauth2/token" &&
|
|
||||||
substr($this->requestUri, 1, 3) === "api" &&
|
substr($this->requestUri, 1, 3) === "api" &&
|
||||||
count(explode("/", $this->requestUri)) >= 4 // url api pattern: /api/1.0/<workspace>/<resource>
|
count(explode("/", $this->requestUri)) >= 4 // url api pattern: /api/1.0/<workspace>/<resource>
|
||||||
) {
|
) {
|
||||||
@@ -252,7 +245,7 @@ class WebApplication
|
|||||||
$serverAddr = $_SERVER ['SERVER_ADDR'];
|
$serverAddr = $_SERVER ['SERVER_ADDR'];
|
||||||
$endTime = microtime(true);
|
$endTime = microtime(true);
|
||||||
$time = $endTime - $startingTime;
|
$time = $endTime - $startingTime;
|
||||||
|
|
||||||
Bootstrap::verifyPath(PATH_DATA . 'logs', true);
|
Bootstrap::verifyPath(PATH_DATA . 'logs', true);
|
||||||
$fpt = fopen(PATH_DATA . 'logs/api.log', 'a');
|
$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']));
|
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']));
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Kernel;
|
|
||||||
use Maveriks\WebApplication;
|
use Maveriks\WebApplication;
|
||||||
use Maveriks\Http\Response;
|
use Maveriks\Http\Response;
|
||||||
use Maveriks\Pattern\Mvc\PhtmlView;
|
use Maveriks\Pattern\Mvc\PhtmlView;
|
||||||
@@ -50,12 +48,6 @@ try {
|
|||||||
$app->run(WebApplication::SERVICE_OAUTH2);
|
$app->run(WebApplication::SERVICE_OAUTH2);
|
||||||
break;
|
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:
|
case WebApplication::RUNNING_DEFAULT:
|
||||||
$response = new Response("", 302);
|
$response = new Response("", 302);
|
||||||
//TODO compose this def url with configuration data from env.ini
|
//TODO compose this def url with configuration data from env.ini
|
||||||
@@ -73,4 +65,3 @@ try {
|
|||||||
$response = new Response($view->getOutput(), 503);
|
$response = new Response($view->getOutput(), 503);
|
||||||
$response->send();
|
$response->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ if (file_exists(FILE_PATHS_INSTALLED)) {
|
|||||||
Bootstrap::verifyPath(PATH_SMARTY_C, true);
|
Bootstrap::verifyPath(PATH_SMARTY_C, true);
|
||||||
Bootstrap::verifyPath(PATH_SMARTY_CACHE, true);
|
Bootstrap::verifyPath(PATH_SMARTY_CACHE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set include path
|
// set include path
|
||||||
set_include_path(
|
set_include_path(
|
||||||
PATH_CORE . PATH_SEPARATOR .
|
PATH_CORE . PATH_SEPARATOR .
|
||||||
|
|||||||
Reference in New Issue
Block a user