From: Tim Düsterhus Date: Fri, 2 Oct 2020 08:43:00 +0000 (+0200) Subject: Remove obsolete SessionHandler::loadVirtualSession() method X-Git-Tag: 5.4.0_Alpha_1~724^2~13^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9bae2102d50499c56f0e0ebe1fcfa3a22f808084;p=GitHub%2FWoltLab%2FWCF.git Remove obsolete SessionHandler::loadVirtualSession() method --- diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index e54cd94586..195e98d588 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -431,42 +431,6 @@ class SessionHandler extends SingletonFactory { $this->user = new User($this->session->userID); } - /** - * Loads the virtual session object unless the user is not logged in or the session - * does not support virtual sessions. If there is no virtual session yet, it will be - * created on-the-fly. - * - * @param boolean $forceReload - */ - protected function loadVirtualSession($forceReload = false) { - if ($this->virtualSession === null || $forceReload) { - $this->virtualSession = null; - if ($this->isACP) { - $virtualSessionAction = new ACPSessionVirtualAction([], 'create', ['data' => ['sessionID' => $this->session->sessionID]]); - } - else { - $virtualSessionAction = new SessionVirtualAction([], 'create', ['data' => ['sessionID' => $this->session->sessionID]]); - } - - try { - $returnValues = $virtualSessionAction->executeAction(); - $this->virtualSession = $returnValues['returnValues']; - } - catch (DatabaseException $e) { - // MySQL error 23000 = unique key - // do not check against the message itself, some weird systems localize them - if ($e->getCode() == 23000) { - if ($this->isACP) { - $this->virtualSession = ACPSessionVirtual::getExistingSession($this->session->sessionID); - } - else { - $this->virtualSession = SessionVirtual::getExistingSession($this->session->sessionID); - } - } - } - } - } - /** * Creates a new session. */