Some changes on WebApplications class and app.php file

This commit is contained in:
Erik Amaru Ortiz
2014-03-17 09:48:23 -04:00
parent 29977e14b7
commit 736275c791
2 changed files with 5 additions and 6 deletions

View File

@@ -73,10 +73,6 @@ class WebApplication
public function run($type = "") public function run($type = "")
{ {
switch ($type) { switch ($type) {
case self::REDIRECT_DEFAULT:
//TODO we can set a configurable redirect url
header("location: /sys/en/neoclassic/login/login");
break;
case self::SERVICE_API: case self::SERVICE_API:
$request = $this->parseApiRequestUri(); $request = $this->parseApiRequestUri();
$this->loadEnvironment($request["workspace"]); $this->loadEnvironment($request["workspace"]);

View File

@@ -38,7 +38,7 @@ try {
//$loader->add($rootDir . "workflow/engine/classes/model/"); //$loader->add($rootDir . "workflow/engine/classes/model/");
$loader->add($rootDir . 'workflow/engine/src/'); $loader->add($rootDir . 'workflow/engine/src/');
// and vendors to autoloader // add vendors to autoloader
$loader->add($rootDir . 'vendor/luracast/restler/vendor', "Luracast"); $loader->add($rootDir . 'vendor/luracast/restler/vendor', "Luracast");
$loader->add($rootDir . 'vendor/bshaffer/oauth2-server-php/src/', "OAuth2"); $loader->add($rootDir . 'vendor/bshaffer/oauth2-server-php/src/', "OAuth2");
$loader->addClass("Bootstrap", $rootDir . 'gulliver/system/class.bootstrap.php'); $loader->addClass("Bootstrap", $rootDir . 'gulliver/system/class.bootstrap.php');
@@ -67,7 +67,10 @@ try {
break; break;
case Maveriks\WebApplication::RUNNING_DEFAULT: case Maveriks\WebApplication::RUNNING_DEFAULT:
$app->run(Maveriks\WebApplication::REDIRECT_DEFAULT); $response = new Maveriks\Http\Response("", 302);
//TODO compose this def url with configuration data from env.ini
$response->setHeader("location", "/sys/en/neoclassic/login/login");
$response->send();
break; break;
} }