From 5327ff5c058552ca2954b2eccdd652d0c2f7c55a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 5 Oct 2020 10:47:05 +0200 Subject: [PATCH] Make SessionHandler::keepAlive() a no-op --- .../files/lib/data/session/SessionAction.class.php | 3 --- .../lib/system/session/SessionHandler.class.php | 13 ++----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/wcfsetup/install/files/lib/data/session/SessionAction.class.php b/wcfsetup/install/files/lib/data/session/SessionAction.class.php index 3bc04b57d7..071607fad7 100644 --- a/wcfsetup/install/files/lib/data/session/SessionAction.class.php +++ b/wcfsetup/install/files/lib/data/session/SessionAction.class.php @@ -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) diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index b6dd40b110..afbb1582b8 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -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. -- 2.20.1