From f02a7999c069f746fdeefee4f4b42ca240be36a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 14 Mar 2009 03:40:33 +0000 Subject: [PATCH] Updated to latest core revision, a lot debug constants removed --- application/ship-simu/class_ApplicationHelper.php | 6 ++++-- index.php | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/application/ship-simu/class_ApplicationHelper.php b/application/ship-simu/class_ApplicationHelper.php index e1af862..53d3fc3 100644 --- a/application/ship-simu/class_ApplicationHelper.php +++ b/application/ship-simu/class_ApplicationHelper.php @@ -175,6 +175,9 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication // Create a new request object $requestInstance = ObjectFactory::createObjectByName('HttpRequest'); + // Remember request instance here + $this->setRequestInstance($requestInstance); + // Default response is HTTP (HTML page) and type is "Web" $response = "http"; $responseType = "web"; @@ -190,8 +193,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication $responseClass = sprintf("%sResponse", $this->convertToClassName($response)); $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this)); - // Remember both in this application - $this->setRequestInstance($requestInstance); + // Remember response instance here $this->setResponseInstance($responseInstance); // Get the parameter from the request diff --git a/index.php b/index.php index 62f3069..ec90803 100644 --- a/index.php +++ b/index.php @@ -83,17 +83,16 @@ class ApplicationEntryPoint { // Get some instances $tpl = FrameworkConfiguration::getInstance()->readConfig('template_class'); $lang = LanguageSystem::getInstance(); - $io = FileIoHandler::getInstance(); // Get response instance $responseInstance = ApplicationHelper::getInstance()->getResponseInstance(); // Is the template engine loaded? - if ((class_exists($tpl)) && (is_object($lang)) && (is_object($io))) { + if ((class_exists($tpl)) && (is_object($lang))) { // Use the template engine for putting out (nicer look) the message try { // Get the template instance from our object factory - $templateInstance = ObjectFactory::createObjectByName($tpl, array(FrameworkConfiguration::getInstance()->readConfig('tpl_base_path'), $lang, $io)); + $templateInstance = ObjectFactory::createObjectByName($tpl, array(ApplicationHelper::getInstance())); } catch (FrameworkException $e) { die(sprintf("[Main:] Could not initialize template engine for reason: %s", $e->getMessage() -- 2.30.2