From f4d7d95f2a03111bbe5f2101d258f0daa67eacb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 14 Mar 2009 01:56:48 +0000 Subject: [PATCH] Templates moved from core to add directory --- .gitattributes | 4 +++ .../templates/de/code/emergency_exit.ctp | 29 +++++++++++++++++++ .../selector/templates/de/code/footer_msg.ctp | 8 +++++ application/ship-simu/config.php | 3 ++ .../main/login/class_ShipSimuGuestLogin.php | 14 +++------ .../main/login/class_ShipSimuUserLogin.php | 19 +++++------- .../templates/de/code/emergency_exit.ctp | 29 +++++++++++++++++++ .../templates/de/code/footer_msg.ctp | 8 +++++ .../templates/de/code/login_form.ctp | 2 +- .../templates/de/code/shipsimu_main.ctp | 4 +++ 10 files changed, 97 insertions(+), 23 deletions(-) create mode 100644 application/selector/templates/de/code/emergency_exit.ctp create mode 100644 application/selector/templates/de/code/footer_msg.ctp create mode 100644 application/ship-simu/templates/de/code/emergency_exit.ctp create mode 100644 application/ship-simu/templates/de/code/footer_msg.ctp diff --git a/.gitattributes b/.gitattributes index 5d5dff6..57c3ca2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,6 +15,8 @@ application/selector/starter.php -text application/selector/templates/.htaccess -text application/selector/templates/de/.htaccess -text application/selector/templates/de/code/.htaccess -text +application/selector/templates/de/code/emergency_exit.ctp -text +application/selector/templates/de/code/footer_msg.ctp -text application/selector/templates/de/code/selector_apps.ctp -text application/selector/templates/de/code/selector_main.ctp -text application/ship-simu/.htaccess -text @@ -201,7 +203,9 @@ application/ship-simu/templates/de/code/block_company_data.ctp -text application/ship-simu/templates/de/code/block_persona_data.ctp -text application/ship-simu/templates/de/code/captch_graphic_code.ctp -text application/ship-simu/templates/de/code/confirm_link.ctp -text +application/ship-simu/templates/de/code/emergency_exit.ctp -text application/ship-simu/templates/de/code/footer.ctp -text +application/ship-simu/templates/de/code/footer_msg.ctp -text application/ship-simu/templates/de/code/header.ctp -text application/ship-simu/templates/de/code/home.ctp -text application/ship-simu/templates/de/code/login_failed.ctp -text diff --git a/application/selector/templates/de/code/emergency_exit.ctp b/application/selector/templates/de/code/emergency_exit.ctp new file mode 100644 index 0000000..e974daf --- /dev/null +++ b/application/selector/templates/de/code/emergency_exit.ctp @@ -0,0 +1,29 @@ +{?header:title="Problem in application framework detected!"?} + +
+ $content[message] +
+ +
+
+ File inclusion backtrace: +
+
+ $content[backtrace] +
+
+ +
+
+ Statistics +
+
+ Total objects: $content[total_objects] +
+
+ Loaded class files: $content[total_includes] + (Including exception and interfaces.) +
+
+ +{?footer_msg:footer_msg="Please contact the support and supply the full above message, if you think you are not qualified to fix this problem."?} diff --git a/application/selector/templates/de/code/footer_msg.ctp b/application/selector/templates/de/code/footer_msg.ctp new file mode 100644 index 0000000..fb1de36 --- /dev/null +++ b/application/selector/templates/de/code/footer_msg.ctp @@ -0,0 +1,8 @@ + + + + + + diff --git a/application/ship-simu/config.php b/application/ship-simu/config.php index ca1565d..b1b4176 100644 --- a/application/ship-simu/config.php +++ b/application/ship-simu/config.php @@ -400,5 +400,8 @@ $cfg->setConfigEntry('web_cmd_government_failed_resolver_class', "WebGovernmentF // CFG: REFILL-REQUEST-CURRENCY-PAYMENT-TYPE $cfg->setConfigEntry('refill_request_currency_payment_type', "test"); +// CFG: LOGIN-REGISTER-LOGIN-FORM +$cfg->setConfigEntry('login_register_login_form', "index.php?app={?app_short_name?}&page=register"); + // [EOF] ?> diff --git a/application/ship-simu/main/login/class_ShipSimuGuestLogin.php b/application/ship-simu/main/login/class_ShipSimuGuestLogin.php index d4b0365..adae78a 100644 --- a/application/ship-simu/main/login/class_ShipSimuGuestLogin.php +++ b/application/ship-simu/main/login/class_ShipSimuGuestLogin.php @@ -90,17 +90,11 @@ class ShipSimuGuestLogin extends BaseFrameworkSystem implements LoginableUser { throw new MissingMethodException(array($this, $method), self::EXCEPTION_MISSING_METHOD); } - // Get a instance of the registry - $userInstance = Registry::getRegistry()->getInstance('user'); + // Get a user instance + $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('guest_class'), $method), array($data)); - // Is there an instance? - if (is_null($userInstance)) { - // Get a user instance - $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('guest_class'), $method), array($data)); - - // Remember this new instance in registry - Registry::getRegistry()->addInstance($userInstance); - } // END - if + // Remember this new instance in registry + Registry::getRegistry()->addInstance('user', $userInstance); // Is the password correct? if ($userInstance->ifPasswordHashMatches($requestInstance) === false) { diff --git a/application/ship-simu/main/login/class_ShipSimuUserLogin.php b/application/ship-simu/main/login/class_ShipSimuUserLogin.php index 178c408..f52097f 100644 --- a/application/ship-simu/main/login/class_ShipSimuUserLogin.php +++ b/application/ship-simu/main/login/class_ShipSimuUserLogin.php @@ -73,24 +73,19 @@ class ShipSimuUserLogin extends BaseFrameworkSystem implements LoginableUser { $method = null; $data = ""; - // Get a instance of the registry - $userInstance = Registry::getRegistry()->getInstance('user'); + // Get member class + $userClass = $this->getConfigInstance()->readConfig('user_class'); - // Is there an instance? - if (is_null($userInstance)) { - // Get member class - $userClass = $this->getConfigInstance()->readConfig('user_class'); + // Get a user instance + $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance)); - // Get a user instance - $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance)); - - // Remember this new instance in registry - Registry::getRegistry()->addInstance($userInstance); - } // END - if + // Remember this new instance in registry + Registry::getRegistry()->addInstance('user', $userInstance); // Is the password correct? if ($userInstance->ifPasswordHashMatches($requestInstance) === false) { // Mismatching password + $userInstance->debugInstance(); throw new UserPasswordMismatchException(array($this, $userInstance), BaseUser::EXCEPTION_USER_PASS_MISMATCH); } // END - if diff --git a/application/ship-simu/templates/de/code/emergency_exit.ctp b/application/ship-simu/templates/de/code/emergency_exit.ctp new file mode 100644 index 0000000..e974daf --- /dev/null +++ b/application/ship-simu/templates/de/code/emergency_exit.ctp @@ -0,0 +1,29 @@ +{?header:title="Problem in application framework detected!"?} + +
+ $content[message] +
+ +
+
+ File inclusion backtrace: +
+
+ $content[backtrace] +
+
+ +
+
+ Statistics +
+
+ Total objects: $content[total_objects] +
+
+ Loaded class files: $content[total_includes] + (Including exception and interfaces.) +
+
+ +{?footer_msg:footer_msg="Please contact the support and supply the full above message, if you think you are not qualified to fix this problem."?} diff --git a/application/ship-simu/templates/de/code/footer_msg.ctp b/application/ship-simu/templates/de/code/footer_msg.ctp new file mode 100644 index 0000000..fb1de36 --- /dev/null +++ b/application/ship-simu/templates/de/code/footer_msg.ctp @@ -0,0 +1,8 @@ + + + + + + diff --git a/application/ship-simu/templates/de/code/login_form.ctp b/application/ship-simu/templates/de/code/login_form.ctp index 6b0110d..40af9de 100644 --- a/application/ship-simu/templates/de/code/login_form.ctp +++ b/application/ship-simu/templates/de/code/login_form.ctp @@ -70,7 +70,7 @@ if ($helperInstance->ifGuestLoginAllowed()) { } // Get helper instance -$helperInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'register_login_form', 'index.php?app={?app_short_name?}&page=register')); +$helperInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'register_login_form')); // Set link text $helperInstance->addLinkWithTextById('register_login'); diff --git a/application/ship-simu/templates/de/code/shipsimu_main.ctp b/application/ship-simu/templates/de/code/shipsimu_main.ctp index e15d8d9..8fc7404 100644 --- a/application/ship-simu/templates/de/code/shipsimu_main.ctp +++ b/application/ship-simu/templates/de/code/shipsimu_main.ctp @@ -12,6 +12,10 @@ {?nav_advert?} +
+ {?language_selector?} +
+
{?content?}
-- 2.39.5