From 6e78fccb4032a9bd65161c70fd92d59208071fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 17 Jul 2014 12:02:43 +0200 Subject: [PATCH] use accessor to get session --- lib/file.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/file.php b/lib/file.php index 02028164..16df11b5 100644 --- a/lib/file.php +++ b/lib/file.php @@ -99,9 +99,10 @@ class File { public function checkPassword($password){ $shareId = $this->getShareId(); if (!$this->isPasswordProtected() - || (\OC::$session->exists('public_link_authenticated') - && \OC::$session->get('public_link_authenticated') === $shareId) - ){ + || (\OC::$server->getSession()->exists('public_link_authenticated') + && \OC::$server->getSession()->get('public_link_authenticated') === $shareId + ) + ){ return true; } @@ -111,7 +112,7 @@ class File { if ($hasher->CheckPassword($password.\OC_Config::getValue('passwordsalt', ''), $this->getPassword())) { // Save item id in session for future request - \OC::$session->set('public_link_authenticated', $shareId); + \OC::$server->getSession()->set('public_link_authenticated', $shareId); return true; } return false;