From: Tim Düsterhus Date: Wed, 14 Oct 2020 13:47:33 +0000 (+0200) Subject: Move spiderID out of the environment array X-Git-Tag: 5.4.0_Alpha_1~724^2~10^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd1318f6ca62d30dfcd0d096d38455591e0b743c;p=GitHub%2FWoltLab%2FWCF.git Move spiderID out of the environment array There is no better replacement as of now. --- 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, ];