From ddfc10f7a40e978fe1a2792aab8d40cebc032845 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 14 Mar 2009 01:57:30 +0000 Subject: [PATCH] Templates moved from core to add directory --- .gitattributes | 2 ++ .../admin/main/login/class_AdminUserLogin.php | 18 ++++-------- .../templates/de/html/emergency_exit.ctp | 29 +++++++++++++++++++ .../admin/templates/de/html/footer_msg.ctp | 8 +++++ 4 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 application/admin/templates/de/html/emergency_exit.ctp create mode 100644 application/admin/templates/de/html/footer_msg.ctp diff --git a/.gitattributes b/.gitattributes index 46261ec..3f1425f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -47,6 +47,8 @@ application/admin/templates/de/code/register_form.ctp -text application/admin/templates/de/emails/.htaccess -text application/admin/templates/de/emails/text_resend_link.tpl -text application/admin/templates/de/html/.htaccess -text +application/admin/templates/de/html/emergency_exit.ctp -text +application/admin/templates/de/html/footer_msg.ctp -text application/admin/templates/de/html/nav_advert.tpl -text application/admin/templates/de/html/selector_admin.tpl -text application/admin/templates/images/.htaccess -text diff --git a/application/admin/main/login/class_AdminUserLogin.php b/application/admin/main/login/class_AdminUserLogin.php index a4187a5..423297e 100644 --- a/application/admin/main/login/class_AdminUserLogin.php +++ b/application/admin/main/login/class_AdminUserLogin.php @@ -73,20 +73,14 @@ class AdminUserLogin 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) { diff --git a/application/admin/templates/de/html/emergency_exit.ctp b/application/admin/templates/de/html/emergency_exit.ctp new file mode 100644 index 0000000..e974daf --- /dev/null +++ b/application/admin/templates/de/html/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/admin/templates/de/html/footer_msg.ctp b/application/admin/templates/de/html/footer_msg.ctp new file mode 100644 index 0000000..fb1de36 --- /dev/null +++ b/application/admin/templates/de/html/footer_msg.ctp @@ -0,0 +1,8 @@ + + + + + + -- 2.39.5