Added feature #11798: Remove "Login-error or session timed out" screen (thanks to...
authorRupert Germann <rupi@gmx.li>
Sun, 6 Sep 2009 14:13:11 +0000 (14:13 +0000)
committerRupert Germann <rupi@gmx.li>
Sun, 6 Sep 2009 14:13:11 +0000 (14:13 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5901 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_beuserauth.php
typo3/index.php

index d97c4e0..a715b36 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-06  Rupert Germann  <rupi@gmx.li>
+
+       * Added feature #11798: Remove "Login-error or session timed out" screen (thanks to Steffen Gebert)
+
 2009-09-06  Steffen Kamper  <info@sk-typo3.de>
 
        * Updated swfobjects from version 2.1 to version 2.2
index b54d1d4..42bf7ef 100644 (file)
@@ -200,8 +200,7 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
        function backendCheckLogin()    {
                if (!$this->user['uid'])        {
                        if (!defined('TYPO3_PROCEED_IF_NO_USER') || !TYPO3_PROCEED_IF_NO_USER)  {
-                               t3lib_BEfunc::typo3PrintError ('Login-error or session timed-out', 'No user logged in! Sorry, I can\'t proceed then!<br /><br />(You must have cookies enabled!)<br /><br />If your session has just timed-out, you may<br /><a href="'.t3lib_div::locationHeaderUrl(t3lib_div::getIndpEnv('TYPO3_SITE_URL').TYPO3_mainDir.'index.php'.'" target="_top">click here to re-login</a>.',0));
-                               exit;
+                               t3lib_div::redirect($GLOBALS['BACK_PATH']);
                        }
                } else {        // ...and if that's the case, call these functions
                        $this->fetchGroupData();        //      The groups are fetched and ready for permission checking in this initialization.        Tables.php must be read before this because stuff like the modules has impact in this
index e39be67..422203f 100644 (file)
@@ -695,6 +695,12 @@ class SC_index {
                                return (((which >= 65 && which <= 90) && !shift_status) || 
                                        ((which >= 97 && which <= 122) && shift_status));
                        }
+
+                               // prevent opening the login form in the backend frameset
+                       if (top.location.href != self.location.href) {
+                               top.location.href = self.location.href;
+                       }
+
                        ');
 
                return $JSCode;