Make SessionHandler::keepAlive() a no-op
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 5 Oct 2020 08:47:05 +0000 (10:47 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 15 Oct 2020 14:13:52 +0000 (16:13 +0200)
wcfsetup/install/files/lib/data/session/SessionAction.class.php
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index 3bc04b57d7a68780e66f57a831d82361d433772c..071607fad7867547f59e62db1fc86ca853a74506 100644 (file)
@@ -55,9 +55,6 @@ class SessionAction extends AbstractDatabaseObjectAction {
                        return [];
                }
                
-               // update last activity time
-               SessionHandler::getInstance()->keepAlive();
-               
                // update notification counts
                $this->keepAliveData = [
                        'userNotificationCount' => UserNotificationHandler::getInstance()->getNotificationCount(true)
index b6dd40b11063ca87dce8bb564edb5621188d92af..afbb1582b808abdcdbb65cd901c03570ff965f9b 100644 (file)
@@ -742,18 +742,9 @@ final class SessionHandler extends SingletonFactory {
        }
        
        /**
-        * Updates last activity time to protect session from expiring.
+        * @deprecated 5.4 - This method is a noop. The lastActivityTime is always updated immediately after loading.
         */
-       public function keepAlive() {
-               $this->disableUpdate();
-               
-               // update last activity time
-               /** @var \wcf\data\DatabaseObjectEditor $sessionEditor */
-               $sessionEditor = new $this->sessionEditorClassName($this->session);
-               $sessionEditor->update([
-                       'lastActivityTime' => TIME_NOW
-               ]);
-       }
+       public function keepAlive() { }
        
        /**
         * Deletes this session and its related data.