From: Roland Häder Date: Wed, 7 May 2008 15:45:07 +0000 (+0000) Subject: Several small fixes applied X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f39784df0ad603e5901821923459b36c1e96172a;p=shipsimu.git Several small fixes applied --- diff --git a/application/ship-simu/class_ApplicationHelper.php b/application/ship-simu/class_ApplicationHelper.php index 2b31ffa..7537386 100644 --- a/application/ship-simu/class_ApplicationHelper.php +++ b/application/ship-simu/class_ApplicationHelper.php @@ -177,17 +177,20 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica * @return void */ public final function entryPoint () { - // Get default command - $defaultCommand = $this->getConfigInstance()->readConfig("default_command"); - // Create a new request object $requestInstance = HttpRequest::createHttpRequest(); // ... and a new response object $responseInstance = HttpResponse::createHttpResponse($this); + // Get default command + $defaultCommand = $this->getConfigInstance()->readConfig("default_command"); + + // Get a resolver + $resolverInstance = WebControllerResolver::createWebControllerResolver($defaultCommand, $this); + // Get a new controller instance as well - $controllerInstance = WebControllerResolver::createWebControllerResolver($defaultCommand, $this)->resolveDefaultController(); + $controllerInstance = $resolverInstance->resolveDefaultController(); // Handle the request $controllerInstance->handleRequest($requestInstance, $responseInstance); diff --git a/application/ship-simu/config.php b/application/ship-simu/config.php index f9bff72..a1c85d6 100644 --- a/application/ship-simu/config.php +++ b/application/ship-simu/config.php @@ -28,5 +28,8 @@ $cfg = FrameworkConfiguration::getInstance(); // CFG: DEFAULT-COMMAND $cfg->setConfigEntry("default_command", "home"); +// CFG: HOME-WITH-NEWS +$cfg->setConfigEntry("home_with_news", "Y"); + // [EOF] ?> diff --git a/application/ship-simu/templates/de/code/header.ctp b/application/ship-simu/templates/de/code/header.ctp index 1f81187..2306a6b 100644 --- a/application/ship-simu/templates/de/code/header.ctp +++ b/application/ship-simu/templates/de/code/header.ctp @@ -1,5 +1,5 @@ - + Ship-Simu Schiffsimulator - $content[title] diff --git a/inc/classes/interfaces/response/class_Responseable.php b/inc/classes/interfaces/response/class_Responseable.php index d8fdaee..7416b94 100644 --- a/inc/classes/interfaces/response/class_Responseable.php +++ b/inc/classes/interfaces/response/class_Responseable.php @@ -56,7 +56,7 @@ interface Responseable extends FrameworkInterface { * @throws ResponseHeadersAlreadySentException Thrown if headers are * already sent */ - function flushResponse($force=false); + function flushBuffer($force=false); } // diff --git a/inc/classes/main/response/class_HttpResponse.php b/inc/classes/main/response/class_HttpResponse.php index 3679fe9..05e6f98 100644 --- a/inc/classes/main/response/class_HttpResponse.php +++ b/inc/classes/main/response/class_HttpResponse.php @@ -119,7 +119,7 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable { * @throws ResponseHeadersAlreadySentException Thrown if headers are * already sent */ - public function flushResponse ($force=false) { + public function flushBuffer ($force=false) { if ((headers_sent()) && (!$force)) { // Headers are already sent! throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);