0010780: MessageBox "Session invalid" occurs if Browser is closed without logout...
authorCornelius Weiß <c.weiss@metaways.de>
Thu, 16 Feb 2017 11:46:55 +0000 (12:46 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 22 Feb 2017 10:42:35 +0000 (11:42 +0100)
Change-Id: I53dd73a34941e2c366efe5d338cb72a9414564c9
Reviewed-on: http://gerrit.tine20.com/customers/4224
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/js/tineInit.js

index a1a3bbd..3b2639f 100644 (file)
@@ -323,10 +323,12 @@ Tine.Tinebase.tineInit = {
          */
         Ext.Ajax.on('beforerequest', function (connection, options) {
 
-            var jsonKey = Tine.Tinebase.registry && Tine.Tinebase.registry.get ? Tine.Tinebase.registry.get('jsonKey') : '';
-            if (Tine.Tinebase.tineInit.jsonKeyCookieProvider.get(this.jsonKeyCookieId)) {
-                var cookieJsonKey = Tine.Tinebase.tineInit.jsonKeyCookieProvider.get(this.jsonKeyCookieId);
-                Tine.Tinebase.tineInit.jsonKeyCookieProvider.clear(this.jsonKeyCookieId);
+            var jsonKey = Tine.Tinebase.registry && Tine.Tinebase.registry.get ? Tine.Tinebase.registry.get('jsonKey') : '',
+                jsonKeyCookieId = Tine.Tinebase.tineInit.jsonKeyCookieId,
+                cookieJsonKey = Tine.Tinebase.tineInit.jsonKeyCookieProvider.get(jsonKeyCookieId);
+
+            if (cookieJsonKey) {
+                Tine.Tinebase.tineInit.jsonKeyCookieProvider.clear(jsonKeyCookieId);
                 // NOTE cookie reset is not always working in IE, so we need to check jsonKey again
                 if (cookieJsonKey && cookieJsonKey != "null") {
                     jsonKey = cookieJsonKey;