]> git.mxchange.org Git - shipsimu.git/commitdiff
Templates moved from core to add directory
authorRoland Häder <roland@mxchange.org>
Sat, 14 Mar 2009 01:56:48 +0000 (01:56 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 14 Mar 2009 01:56:48 +0000 (01:56 +0000)
.gitattributes
application/selector/templates/de/code/emergency_exit.ctp [new file with mode: 0644]
application/selector/templates/de/code/footer_msg.ctp [new file with mode: 0644]
application/ship-simu/config.php
application/ship-simu/main/login/class_ShipSimuGuestLogin.php
application/ship-simu/main/login/class_ShipSimuUserLogin.php
application/ship-simu/templates/de/code/emergency_exit.ctp [new file with mode: 0644]
application/ship-simu/templates/de/code/footer_msg.ctp [new file with mode: 0644]
application/ship-simu/templates/de/code/login_form.ctp
application/ship-simu/templates/de/code/shipsimu_main.ctp

index 5d5dff67d6aacb3b5d12290776c678469fc550b3..57c3ca2b6947514382ee4946a6cde7f363cd3e29 100644 (file)
@@ -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 (file)
index 0000000..e974daf
--- /dev/null
@@ -0,0 +1,29 @@
+{?header:title="Problem in application framework detected!"?}
+
+<div id="emergency_message">
+       $content[message]
+</div>
+
+<div id="emergency_backtrace">
+       <div id="backtrace_header">
+               File inclusion backtrace:
+       </div>
+       <div id="backtrace_content">
+               $content[backtrace]
+       </div>
+</div>
+
+<div id="stats_box">
+       <div id="stats_header">
+               Statistics
+       </div>
+       <div id="stats_objects">
+               Total objects: $content[total_objects]
+       </div>
+       <div id="stats_includes">
+               Loaded class files: $content[total_includes]
+               <span class="hint">(Including exception and interfaces.)</span>
+       </div>
+</div>
+
+{?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 (file)
index 0000000..fb1de36
--- /dev/null
@@ -0,0 +1,8 @@
+       <div id="footer_message">
+               $content[footer_msg]
+       </div>
+
+</div> <!-- masterbox //-->
+
+</body>
+</html>
index ca1565d87d8b6c9a083a75ef1807b098ce14f107..b1b41760fba7d78e1d29df31a5e0512e39560efd 100644 (file)
@@ -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?}&amp;page=register");
+
 // [EOF]
 ?>
index d4b0365c4d58e40b7dcb986c81bb76cde983d2a4..adae78a591dd9416b6a6b59e20edbe7d63c1f59a 100644 (file)
@@ -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) {
index 178c4088a7b81c744c685834d2775599c9fb835c..f52097fd6406df3438d66835bd8cb4be5492cadd 100644 (file)
@@ -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 (file)
index 0000000..e974daf
--- /dev/null
@@ -0,0 +1,29 @@
+{?header:title="Problem in application framework detected!"?}
+
+<div id="emergency_message">
+       $content[message]
+</div>
+
+<div id="emergency_backtrace">
+       <div id="backtrace_header">
+               File inclusion backtrace:
+       </div>
+       <div id="backtrace_content">
+               $content[backtrace]
+       </div>
+</div>
+
+<div id="stats_box">
+       <div id="stats_header">
+               Statistics
+       </div>
+       <div id="stats_objects">
+               Total objects: $content[total_objects]
+       </div>
+       <div id="stats_includes">
+               Loaded class files: $content[total_includes]
+               <span class="hint">(Including exception and interfaces.)</span>
+       </div>
+</div>
+
+{?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 (file)
index 0000000..fb1de36
--- /dev/null
@@ -0,0 +1,8 @@
+       <div id="footer_message">
+               $content[footer_msg]
+       </div>
+
+</div> <!-- masterbox //-->
+
+</body>
+</html>
index 6b0110df88c384c2d23cf20295cdb52e961bbf82..40af9de5b8c510be5c236c5b3b62266a082904ee 100644 (file)
@@ -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?}&amp;page=register'));
+$helperInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'register_login_form'));
 
 // Set link text
 $helperInstance->addLinkWithTextById('register_login');
index e15d8d97108d8cdbbae517a5a40f5cbcff4e3c74..8fc74046c2f1a78fd5a45cabdba566e4b5f9eb61 100644 (file)
        {?nav_advert?}
 </div>
 
+<div id="language">
+       {?language_selector?}
+</div>
+
 <div id="main_content">
        {?content?}
 </div>