From 66422a90c2925474c92b65896e95d37449be669b Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Wed, 24 Jan 2024 09:24:44 +0100 Subject: [PATCH] NTR: delete unusued code (#397) Co-authored-by: Vitalij Mik --- Components/SessionManager/SessionManager.php | 28 -------------------- 1 file changed, 28 deletions(-) diff --git a/Components/SessionManager/SessionManager.php b/Components/SessionManager/SessionManager.php index 0e0e0c7d..ee190ad3 100644 --- a/Components/SessionManager/SessionManager.php +++ b/Components/SessionManager/SessionManager.php @@ -77,34 +77,6 @@ public function extendSessionLifespan($days) # it causes the finish-page to have missing data, like missing address. # it does not make any sense, but its a deep logic of shopware or the session handling # and we have to remove it for now and stick with the default server and system configuration. - return; - - $session = $this->container->get('session'); - - # write session data and commit database transaction to avoid locks - # @see Shopware\Components\Session\PdoSessionHandler::close() - if (method_exists($session, 'save')) { - $session->save(); - } - - session_write_close(); - - - $sessionId = $this->getSessionId(); - $lifetimeSeconds = $days * 24 * 60 * 60; - - ini_set('session.gc_maxlifetime', $lifetimeSeconds); - - /** @var QueryBuilder $qb */ - $qb = $this->connection->createQueryBuilder(); - - $qb->update('s_core_sessions') - ->set('expiry', ':expiry') - ->where($qb->expr()->eq('id', ':id')) - ->setParameter(':expiry', time() + $lifetimeSeconds) - ->setParameter(':id', $sessionId); - - $qb->execute(); } /**