Fixed bug #10066: AJAX relogin polls server too often
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 12 Jan 2009 13:11:23 +0000 (13:11 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 12 Jan 2009 13:11:23 +0000 (13:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4696 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/backend.php
typo3/classes/class.ajaxlogin.php

index 993479a..ad9f43b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-01-12  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug #10065: Use TYPO3 clear.gif for ExtJS in backend.php
+       * Fixed bug #10066: AJAX relogin polls server too often
 
 2009-01-11  Oliver Hader  <oliver@typo3.org>
 
index 17b6651..3b9b457 100644 (file)
@@ -433,7 +433,7 @@ class TYPO3backend {
                // simple timer that polls the server to determine imminent timeout.
                this.timer = new Ajax.PeriodicalUpdater("","ajax.php", {
                        method: "get",
-                       frequency: 10,
+                       frequency: 60,
                        parameters: "ajaxID=BackendLogin::isTimedOut&skipSessionUpdate=1",
                        onSuccess: function(e) {
                                var login = e.responseJSON.login.evalJSON();
@@ -516,7 +516,6 @@ class TYPO3backend {
 
                        new Ajax.Request("ajax.php", {
                                method: "get",
-                               frequency: 10,
                                parameters: "ajaxID=BackendLogin::logout",
                        });
 
index 8716822..f0c99e1 100644 (file)
@@ -94,9 +94,9 @@ class AjaxLogin {
                        $ses_tstamp = $GLOBALS['BE_USER']->user['ses_tstamp'];
                        $timeout = $GLOBALS['BE_USER']->auth_timeout_field;
 
-                       // if 60 seconds from now is later than the session timeout, we need to show the refresh dialog.
-                       // 60 is somewhat arbitrary to allow for a little room during the countdown and load times, etc.
-                       if($GLOBALS['EXEC_TIME'] >= $ses_tstamp+$timeout-60) {
+                       // if 120 seconds from now is later than the session timeout, we need to show the refresh dialog.
+                       // 120 is somewhat arbitrary to allow for a little room during the countdown and load times, etc.
+                       if($GLOBALS['EXEC_TIME'] >= $ses_tstamp+$timeout-120) {
                                $ajaxObj->addContent('login', '{timed_out: true}');
                                $ajaxObj->setContentFormat('json');
                        } else {