From cd1318f6ca62d30dfcd0d096d38455591e0b743c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 14 Oct 2020 15:47:33 +0200 Subject: [PATCH] Move spiderID out of the environment array There is no better replacement as of now. --- .../install/files/lib/system/session/SessionHandler.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index 3d80654b58..0af227d686 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -142,6 +142,9 @@ final class SessionHandler extends SingletonFactory { else if ($key === 'userID') { return $this->user->userID; } + else if ($key === 'spiderID') { + return $this->getSpiderID(UserUtil::getUserAgent()); + } // TODO: pageID, pageObjectID, parentPageID, parentPageObjectID /** @deprecated 5.4 - These values can be retrieved more efficiently by directly using the methods in e.g. UserUtil. */ @@ -150,7 +153,6 @@ final class SessionHandler extends SingletonFactory { 'userAgent' => UserUtil::getUserAgent(), 'requestURI' => UserUtil::getRequestURI(), 'requestMethod' => !empty($_SERVER['REQUEST_METHOD']) ? substr($_SERVER['REQUEST_METHOD'], 0, 7) : '', - 'spiderID' => $this->getSpiderID(UserUtil::getUserAgent()), 'lastActivityTime' => TIME_NOW, ]; -- 2.20.1