From 9bae2102d50499c56f0e0ebe1fcfa3a22f808084 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 2 Oct 2020 10:43:00 +0200 Subject: [PATCH] Remove obsolete SessionHandler::loadVirtualSession() method --- .../system/session/SessionHandler.class.php | 36 ------------------- 1 file changed, 36 deletions(-) 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. */ -- 2.20.1